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

Records an "add exec connection" operation for undo/redo. More...

#include <UndoRedoStack.h>

+ Inheritance diagram for Olympe::AddConnectionCommand:
+ Collaboration diagram for Olympe::AddConnectionCommand:

Public Member Functions

 AddConnectionCommand (const ExecPinConnection &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

ExecPinConnection m_conn
 

Detailed Description

Records an "add exec connection" operation for undo/redo.

Definition at line 126 of file UndoRedoStack.h.

Constructor & Destructor Documentation

◆ AddConnectionCommand()

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

Definition at line 181 of file UndoRedoStack.cpp.

Member Function Documentation

◆ Execute()

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

Applies the command to the graph.

Implements Olympe::ICommand.

Definition at line 186 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), and m_conn.

+ Here is the call graph for this function:

◆ GetDescription()

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

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

"Add Node #3").

Implements Olympe::ICommand.

Definition at line 204 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), m_conn, Olympe::ExecPinConnection::SourceNodeID, Olympe::ExecPinConnection::SourcePinName, Olympe::ExecPinConnection::TargetNodeID, and Olympe::ExecPinConnection::TargetPinName.

+ Here is the call graph for this function:

◆ Undo()

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

Reverses the command on the graph.

Implements Olympe::ICommand.

Definition at line 191 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_conn

ExecPinConnection Olympe::AddConnectionCommand::m_conn
private

Definition at line 135 of file UndoRedoStack.h.

Referenced by Execute(), and GetDescription().


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