![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Command to add a node to the tree. More...
#include <BTEditorCommand.h>
Inheritance diagram for Olympe::AddNodeCommand:
Collaboration diagram for Olympe::AddNodeCommand:Public Member Functions | |
| AddNodeCommand (BehaviorTreeAsset *tree, BTNodeType type, const std::string &name, const Vector &position) | |
| 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. | |
| AddNodeCommand (const TaskNodeDefinition &nodeDef) | |
| 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 |
| Get a human-readable description of the command. | |
Public Member Functions inherited from Olympe::BTEditorCommand | |
| virtual | ~BTEditorCommand ()=default |
| virtual | ~BTEditorCommand ()=default |
Public Member Functions inherited from Olympe::ICommand | |
| virtual | ~ICommand ()=default |
Private Attributes | |
| BehaviorTreeAsset * | m_tree |
| BTNodeType | m_nodeType |
| std::string | m_nodeName |
| Vector | m_position |
| uint32_t | m_createdNodeId |
| TaskNodeDefinition | m_node |
Command to add a node to the tree.
Records an "add node" operation for undo/redo.
Definition at line 110 of file BTEditorCommand.h.
| Olympe::AddNodeCommand::AddNodeCommand | ( | BehaviorTreeAsset * | tree, |
| BTNodeType | type, | ||
| const std::string & | name, | ||
| const Vector & | position | ||
| ) |
Definition at line 102 of file BTEditorCommand.cpp.
|
explicit |
Definition at line 21 of file UndoRedoStack.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::BTEditorCommand.
Definition at line 112 of file BTEditorCommand.cpp.
References BehaviorTreeAsset::AddNode(), m_createdNodeId, m_nodeName, m_nodeType, m_position, and m_tree.
Here is the call graph for this function:
|
overridevirtual |
Applies the command to the graph.
Implements Olympe::ICommand.
Definition at line 26 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), and m_node.
Here is the call graph for this function:
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
Definition at line 130 of file BTEditorCommand.cpp.
References m_nodeName.
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
|
overridevirtual |
Undo the command.
Implements Olympe::BTEditorCommand.
Definition at line 121 of file BTEditorCommand.cpp.
References m_createdNodeId, m_tree, and BehaviorTreeAsset::RemoveNode().
Here is the call graph for this function:
|
overridevirtual |
Reverses the command on the graph.
Implements Olympe::ICommand.
Definition at line 32 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
private |
Definition at line 124 of file BTEditorCommand.h.
|
private |
Definition at line 71 of file UndoRedoStack.h.
Referenced by Execute().
|
private |
Definition at line 122 of file BTEditorCommand.h.
Referenced by Execute(), and GetDescription().
|
private |
Definition at line 121 of file BTEditorCommand.h.
Referenced by Execute().
|
private |
Definition at line 123 of file BTEditorCommand.h.
Referenced by Execute().
|
private |
Definition at line 120 of file BTEditorCommand.h.