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

Command to delete a node from the tree. More...

#include <BTEditorCommand.h>

+ Inheritance diagram for Olympe::BTDeleteNodeCommand:
+ Collaboration diagram for Olympe::BTDeleteNodeCommand:

Classes

struct  Connection
 

Public Member Functions

 BTDeleteNodeCommand (BehaviorTreeAsset *tree, uint32_t nodeId)
 
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
 
virtual ~BTEditorCommand ()=default
 

Private Attributes

BehaviorTreeAssetm_tree
 
uint32_t m_nodeId
 
BTNode m_savedNode
 
std::vector< Connectionm_savedConnections
 

Detailed Description

Command to delete a node from the tree.

Definition at line 126 of file BTEditorCommand.h.

Constructor & Destructor Documentation

◆ BTDeleteNodeCommand()

Olympe::BTDeleteNodeCommand::BTDeleteNodeCommand ( BehaviorTreeAsset tree,
uint32_t  nodeId 
)

Definition at line 134 of file BTEditorCommand.cpp.

References GetComponentTypeID_Static(), m_savedConnections, m_savedNode, and Olympe::BTDeleteNodeCommand::Connection::parentId.

+ Here is the call graph for this function:

Member Function Documentation

◆ Execute()

void Olympe::BTDeleteNodeCommand::Execute ( )
overridevirtual

Execute the command.

Implements Olympe::BTEditorCommand.

Definition at line 177 of file BTEditorCommand.cpp.

References m_nodeId, m_tree, and BehaviorTreeAsset::RemoveNode().

+ Here is the call graph for this function:

◆ GetDescription()

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

Get a human-readable description of the command.

Implements Olympe::BTEditorCommand.

Definition at line 222 of file BTEditorCommand.cpp.

References m_nodeId.

◆ Undo()

void Olympe::BTDeleteNodeCommand::Undo ( )
overridevirtual

Member Data Documentation

◆ m_nodeId

uint32_t Olympe::BTDeleteNodeCommand::m_nodeId
private

Definition at line 137 of file BTEditorCommand.h.

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

◆ m_savedConnections

std::vector<Connection> Olympe::BTDeleteNodeCommand::m_savedConnections
private

Definition at line 145 of file BTEditorCommand.h.

Referenced by BTDeleteNodeCommand(), and Undo().

◆ m_savedNode

BTNode Olympe::BTDeleteNodeCommand::m_savedNode
private

Definition at line 138 of file BTEditorCommand.h.

Referenced by BTDeleteNodeCommand(), and Undo().

◆ m_tree

BehaviorTreeAsset* Olympe::BTDeleteNodeCommand::m_tree
private

Definition at line 136 of file BTEditorCommand.h.

Referenced by Execute(), and Undo().


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