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

Command to connect two nodes. More...

#include <BTEditorCommand.h>

+ Inheritance diagram for Olympe::ConnectNodesCommand:
+ Collaboration diagram for Olympe::ConnectNodesCommand:

Public Member Functions

 ConnectNodesCommand (BehaviorTreeAsset *tree, uint32_t parentId, uint32_t childId)
 
void Execute () override
 Execute the command.
 
void Undo () override
 Undo the command.
 
std::string GetDescription () const override
 Get a human-readable description of the command.
 
- Public Member Functions inherited from Olympe::BTEditorCommand
virtual ~BTEditorCommand ()=default
 

Private Attributes

BehaviorTreeAssetm_tree
 
uint32_t m_parentId
 
uint32_t m_childId
 

Detailed Description

Command to connect two nodes.

Definition at line 172 of file BTEditorCommand.h.

Constructor & Destructor Documentation

◆ ConnectNodesCommand()

Olympe::ConnectNodesCommand::ConnectNodesCommand ( BehaviorTreeAsset tree,
uint32_t  parentId,
uint32_t  childId 
)

Definition at line 261 of file BTEditorCommand.cpp.

Member Function Documentation

◆ Execute()

void Olympe::ConnectNodesCommand::Execute ( )
overridevirtual

Execute the command.

Implements Olympe::BTEditorCommand.

Definition at line 268 of file BTEditorCommand.cpp.

References BehaviorTreeAsset::ConnectNodes(), m_childId, m_parentId, and m_tree.

+ Here is the call graph for this function:

◆ GetDescription()

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

Get a human-readable description of the command.

Implements Olympe::BTEditorCommand.

Definition at line 286 of file BTEditorCommand.cpp.

References m_childId, and m_parentId.

◆ Undo()

void Olympe::ConnectNodesCommand::Undo ( )
overridevirtual

Undo the command.

Implements Olympe::BTEditorCommand.

Definition at line 277 of file BTEditorCommand.cpp.

References BehaviorTreeAsset::DisconnectNodes(), m_childId, m_parentId, and m_tree.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_childId

uint32_t Olympe::ConnectNodesCommand::m_childId
private

Definition at line 184 of file BTEditorCommand.h.

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

◆ m_parentId

uint32_t Olympe::ConnectNodesCommand::m_parentId
private

Definition at line 183 of file BTEditorCommand.h.

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

◆ m_tree

BehaviorTreeAsset* Olympe::ConnectNodesCommand::m_tree
private

Definition at line 182 of file BTEditorCommand.h.

Referenced by Execute(), and Undo().


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