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

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

#include <UndoRedoStack.h>

+ Inheritance diagram for Olympe::RemoveExecPinCommand:
+ Collaboration diagram for Olympe::RemoveExecPinCommand:

Public Member Functions

 RemoveExecPinCommand (int32_t nodeID, const std::string &pinName, int pinIndex, int32_t linkedTargetNodeID, const std::string &linkedTargetPinName)
 
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
 
int m_pinIndex
 
int32_t m_linkedTargetNodeID
 -1 if no outgoing link was present
 
std::string m_linkedTargetPinName
 

Detailed Description

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

Execute() removes the pin from DynamicExecOutputPins at the stored index, and removes any ExecConnection originating from that pin. Undo() re-inserts the pin at its original index and restores any saved connection.

Stored data:

Definition at line 297 of file UndoRedoStack.h.

Constructor & Destructor Documentation

◆ RemoveExecPinCommand()

Olympe::RemoveExecPinCommand::RemoveExecPinCommand ( int32_t  nodeID,
const std::string &  pinName,
int  pinIndex,
int32_t  linkedTargetNodeID,
const std::string &  linkedTargetPinName 
)

Definition at line 434 of file UndoRedoStack.cpp.

Member Function Documentation

◆ Execute()

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

Applies the command to the graph.

Implements Olympe::ICommand.

Definition at line 447 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), m_nodeID, and m_pinIndex.

+ Here is the call graph for this function:

◆ GetDescription()

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

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

"Add Node #3").

Implements Olympe::ICommand.

Definition at line 504 of file UndoRedoStack.cpp.

References m_nodeID, and m_pinName.

◆ Undo()

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

Reverses the command on the graph.

Implements Olympe::ICommand.

Definition at line 472 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), m_linkedTargetNodeID, m_linkedTargetPinName, m_nodeID, m_pinIndex, m_pinName, and Olympe::ExecPinConnection::SourceNodeID.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_linkedTargetNodeID

int32_t Olympe::RemoveExecPinCommand::m_linkedTargetNodeID
private

-1 if no outgoing link was present

Definition at line 313 of file UndoRedoStack.h.

Referenced by Undo().

◆ m_linkedTargetPinName

std::string Olympe::RemoveExecPinCommand::m_linkedTargetPinName
private

Definition at line 314 of file UndoRedoStack.h.

Referenced by Undo().

◆ m_nodeID

int32_t Olympe::RemoveExecPinCommand::m_nodeID
private

Definition at line 310 of file UndoRedoStack.h.

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

◆ m_pinIndex

int Olympe::RemoveExecPinCommand::m_pinIndex
private

Definition at line 312 of file UndoRedoStack.h.

Referenced by Execute(), and Undo().

◆ m_pinName

std::string Olympe::RemoveExecPinCommand::m_pinName
private

Definition at line 311 of file UndoRedoStack.h.

Referenced by GetDescription(), and Undo().


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