Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Olympe::AddDynamicPinCommand Class Reference

Records "add dynamic exec-out pin" on a VSSequence or VSSwitch node for undo/redo. More...

#include <UndoRedoStack.h>

+ Inheritance diagram for Olympe::AddDynamicPinCommand:
+ Collaboration diagram for Olympe::AddDynamicPinCommand:

Public Member Functions

 AddDynamicPinCommand (int32_t nodeID, const std::string &pinName)
 
void Execute (TaskGraphTemplate &graph) override
 Applies the command to the graph.
 
void Undo (TaskGraphTemplate &graph) override
 Reverses the command on the graph.
 
std::string GetDescription () const override
 Returns a short human-readable description (e.g.
 
- Public Member Functions inherited from Olympe::ICommand
virtual ~ICommand ()=default
 

Private Attributes

int32_t m_nodeID
 
std::string m_pinName
 

Detailed Description

Records "add dynamic exec-out pin" on a VSSequence or VSSwitch node for undo/redo.

Execute() adds a new pin name (e.g. "Out_2" or "Case_2") to the node's DynamicExecOutputPins vector and rebuilds the lookup cache. Undo() removes the last pin.

Definition at line 263 of file UndoRedoStack.h.

Constructor & Destructor Documentation

◆ AddDynamicPinCommand()

Olympe::AddDynamicPinCommand::AddDynamicPinCommand ( int32_t  nodeID,
const std::string &  pinName 
)

Definition at line 391 of file UndoRedoStack.cpp.

Member Function Documentation

◆ Execute()

void Olympe::AddDynamicPinCommand::Execute ( TaskGraphTemplate graph)
overridevirtual

Applies the command to the graph.

Implements Olympe::ICommand.

Definition at line 397 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), m_nodeID, and m_pinName.

+ Here is the call graph for this function:

◆ GetDescription()

std::string Olympe::AddDynamicPinCommand::GetDescription ( ) const
overridevirtual

Returns a short human-readable description (e.g.

"Add Node #3").

Implements Olympe::ICommand.

Definition at line 425 of file UndoRedoStack.cpp.

References m_nodeID, and m_pinName.

◆ Undo()

void Olympe::AddDynamicPinCommand::Undo ( TaskGraphTemplate graph)
overridevirtual

Reverses the command on the graph.

Implements Olympe::ICommand.

Definition at line 410 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), m_nodeID, and m_pinName.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_nodeID

int32_t Olympe::AddDynamicPinCommand::m_nodeID
private

Definition at line 272 of file UndoRedoStack.h.

Referenced by Execute(), GetDescription(), and Undo().

◆ m_pinName

std::string Olympe::AddDynamicPinCommand::m_pinName
private

Definition at line 273 of file UndoRedoStack.h.

Referenced by Execute(), GetDescription(), and Undo().


The documentation for this class was generated from the following files: