![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Records a "delete link" operation for undo/redo. More...
#include <UndoRedoStack.h>
Inheritance diagram for Olympe::DeleteLinkCommand:
Collaboration diagram for Olympe::DeleteLinkCommand:Public Member Functions | |
| DeleteLinkCommand (const ExecPinConnection &conn) | |
| DeleteLinkCommand (const DataPinConnection &conn) | |
| 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 | |
| bool | m_isExecConn = true |
| ExecPinConnection | m_savedExecConn |
| DataPinConnection | m_savedDataConn |
Records a "delete link" operation for undo/redo.
Supports both exec and data connections. On Execute() the connection is removed from the graph. On Undo() it is restored.
Definition at line 162 of file UndoRedoStack.h.
|
explicit |
Definition at line 251 of file UndoRedoStack.cpp.
|
explicit |
Definition at line 256 of file UndoRedoStack.cpp.
|
overridevirtual |
Applies the command to the graph.
Implements Olympe::ICommand.
Definition at line 261 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), and m_isExecConn.
Here is the call graph for this function:
|
overridevirtual |
Returns a short human-readable description (e.g.
"Add Node #3").
Implements Olympe::ICommand.
Definition at line 299 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), m_isExecConn, m_savedDataConn, m_savedExecConn, Olympe::ExecPinConnection::SourceNodeID, Olympe::DataPinConnection::SourceNodeID, Olympe::ExecPinConnection::SourcePinName, Olympe::DataPinConnection::SourcePinName, Olympe::ExecPinConnection::TargetNodeID, Olympe::DataPinConnection::TargetNodeID, Olympe::ExecPinConnection::TargetPinName, and Olympe::DataPinConnection::TargetPinName.
Here is the call graph for this function:
|
overridevirtual |
Reverses the command on the graph.
Implements Olympe::ICommand.
Definition at line 290 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), m_isExecConn, m_savedDataConn, and m_savedExecConn.
Here is the call graph for this function:Definition at line 172 of file UndoRedoStack.h.
Referenced by Execute(), GetDescription(), and Undo().
|
private |
Definition at line 174 of file UndoRedoStack.h.
Referenced by GetDescription(), and Undo().
|
private |
Definition at line 173 of file UndoRedoStack.h.
Referenced by GetDescription(), and Undo().