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

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DeleteLinkCommand() [1/2]

Olympe::DeleteLinkCommand::DeleteLinkCommand ( const ExecPinConnection conn)
explicit

Definition at line 251 of file UndoRedoStack.cpp.

◆ DeleteLinkCommand() [2/2]

Olympe::DeleteLinkCommand::DeleteLinkCommand ( const DataPinConnection conn)
explicit

Definition at line 256 of file UndoRedoStack.cpp.

Member Function Documentation

◆ Execute()

void Olympe::DeleteLinkCommand::Execute ( TaskGraphTemplate graph)
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:

◆ GetDescription()

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

◆ Undo()

void Olympe::DeleteLinkCommand::Undo ( TaskGraphTemplate graph)
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:

Member Data Documentation

◆ m_isExecConn

bool Olympe::DeleteLinkCommand::m_isExecConn = true
private

Definition at line 172 of file UndoRedoStack.h.

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

◆ m_savedDataConn

DataPinConnection Olympe::DeleteLinkCommand::m_savedDataConn
private

Definition at line 174 of file UndoRedoStack.h.

Referenced by GetDescription(), and Undo().

◆ m_savedExecConn

ExecPinConnection Olympe::DeleteLinkCommand::m_savedExecConn
private

Definition at line 173 of file UndoRedoStack.h.

Referenced by GetDescription(), and Undo().


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