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

CreateNodeCommand - Command to create a new node in graph. More...

#include <CommandSystem.h>

+ Inheritance diagram for Olympe::CreateNodeCommand:
+ Collaboration diagram for Olympe::CreateNodeCommand:

Public Member Functions

 CreateNodeCommand (const std::string &graphId, const std::string &nodeType, float posX, float posY, const std::string &nodeName="")
 
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
 
std::string m_NodeType
 
std::string m_NodeName
 
float m_PosX
 
float m_PosY
 
int m_CreatedNodeId
 

Detailed Description

CreateNodeCommand - Command to create a new node in graph.

Definition at line 93 of file CommandSystem.h.

Constructor & Destructor Documentation

◆ CreateNodeCommand()

Olympe::CreateNodeCommand::CreateNodeCommand ( const std::string &  graphId,
const std::string &  nodeType,
float  posX,
float  posY,
const std::string &  nodeName = "" 
)

Definition at line 147 of file CommandSystem.cpp.

Member Function Documentation

◆ Execute()

void Olympe::CreateNodeCommand::Execute ( )
overridevirtual

◆ GetDescription()

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

Implements Olympe::EditorCommand.

Definition at line 192 of file CommandSystem.cpp.

References m_NodeType.

◆ Undo()

void Olympe::CreateNodeCommand::Undo ( )
overridevirtual

Member Data Documentation

◆ m_CreatedNodeId

int Olympe::CreateNodeCommand::m_CreatedNodeId
private

Definition at line 109 of file CommandSystem.h.

Referenced by Execute(), and Undo().

◆ m_GraphId

std::string Olympe::CreateNodeCommand::m_GraphId
private

Definition at line 104 of file CommandSystem.h.

Referenced by Execute(), and Undo().

◆ m_NodeName

std::string Olympe::CreateNodeCommand::m_NodeName
private

Definition at line 106 of file CommandSystem.h.

Referenced by Execute().

◆ m_NodeType

std::string Olympe::CreateNodeCommand::m_NodeType
private

Definition at line 105 of file CommandSystem.h.

Referenced by Execute(), and GetDescription().

◆ m_PosX

float Olympe::CreateNodeCommand::m_PosX
private

Definition at line 107 of file CommandSystem.h.

Referenced by Execute().

◆ m_PosY

float Olympe::CreateNodeCommand::m_PosY
private

Definition at line 108 of file CommandSystem.h.

Referenced by Execute().


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