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

DuplicateNodeCommand - Command to duplicate a node. More...

#include <CommandSystem.h>

+ Inheritance diagram for Olympe::DuplicateNodeCommand:
+ Collaboration diagram for Olympe::DuplicateNodeCommand:

Public Member Functions

 DuplicateNodeCommand (const std::string &graphId, int sourceNodeId)
 
void Execute () override
 
void Undo () override
 
std::string GetDescription () const override
 
- Public Member Functions inherited from Olympe::EditorCommand
virtual ~EditorCommand ()=default
 

Private Attributes

std::string m_GraphId
 
int m_SourceNodeId
 
int m_CreatedNodeId
 
json m_NodeData
 

Detailed Description

DuplicateNodeCommand - Command to duplicate a node.

Definition at line 212 of file CommandSystem.h.

Constructor & Destructor Documentation

◆ DuplicateNodeCommand()

Olympe::DuplicateNodeCommand::DuplicateNodeCommand ( const std::string &  graphId,
int  sourceNodeId 
)

Definition at line 431 of file CommandSystem.cpp.

Member Function Documentation

◆ Execute()

void Olympe::DuplicateNodeCommand::Execute ( )
overridevirtual

◆ GetDescription()

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

Implements Olympe::EditorCommand.

Definition at line 495 of file CommandSystem.cpp.

References m_SourceNodeId.

◆ Undo()

void Olympe::DuplicateNodeCommand::Undo ( )
overridevirtual

Member Data Documentation

◆ m_CreatedNodeId

int Olympe::DuplicateNodeCommand::m_CreatedNodeId
private

Definition at line 224 of file CommandSystem.h.

Referenced by Execute(), and Undo().

◆ m_GraphId

std::string Olympe::DuplicateNodeCommand::m_GraphId
private

Definition at line 222 of file CommandSystem.h.

Referenced by Execute(), and Undo().

◆ m_NodeData

json Olympe::DuplicateNodeCommand::m_NodeData
private

Definition at line 225 of file CommandSystem.h.

Referenced by Execute().

◆ m_SourceNodeId

int Olympe::DuplicateNodeCommand::m_SourceNodeId
private

Definition at line 223 of file CommandSystem.h.

Referenced by Execute(), and GetDescription().


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