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

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

#include <UndoRedoStack.h>

+ Inheritance diagram for Olympe::AddDataConnectionCommand:
+ Collaboration diagram for Olympe::AddDataConnectionCommand:

Public Member Functions

 AddDataConnectionCommand (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

DataPinConnection m_conn
 

Detailed Description

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

Definition at line 142 of file UndoRedoStack.h.

Constructor & Destructor Documentation

◆ AddDataConnectionCommand()

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

Definition at line 216 of file UndoRedoStack.cpp.

Member Function Documentation

◆ Execute()

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

Applies the command to the graph.

Implements Olympe::ICommand.

Definition at line 221 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static(), and m_conn.

+ Here is the call graph for this function:

◆ GetDescription()

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

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

"Add Node #3").

Implements Olympe::ICommand.

Definition at line 239 of file UndoRedoStack.cpp.

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

+ Here is the call graph for this function:

◆ Undo()

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

Reverses the command on the graph.

Implements Olympe::ICommand.

Definition at line 226 of file UndoRedoStack.cpp.

References GetComponentTypeID_Static().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_conn

DataPinConnection Olympe::AddDataConnectionCommand::m_conn
private

Definition at line 151 of file UndoRedoStack.h.

Referenced by Execute(), and GetDescription().


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