![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Deletes a node from the graph. More...
#include <DeleteNodeCommand.h>
Inheritance diagram for Olympe::NodeGraph::DeleteNodeCommand:
Collaboration diagram for Olympe::NodeGraph::DeleteNodeCommand:Public Member Functions | |
| DeleteNodeCommand (GraphDocument *graph, NodeId nodeId) | |
| void | Execute () override |
| Execute the command. | |
| void | Undo () override |
| Undo the command. | |
| std::string | GetDescription () const override |
| Get description of the command. | |
Public Member Functions inherited from Olympe::NodeGraph::ICommand | |
| virtual | ~ICommand ()=default |
Private Attributes | |
| GraphDocument * | m_graph |
| NodeId | m_nodeId |
| NodeData | m_savedNode |
| std::vector< LinkData > | m_savedLinks |
| bool | m_wasExecuted = false |
Deletes a node from the graph.
Definition at line 20 of file DeleteNodeCommand.h.
| Olympe::NodeGraph::DeleteNodeCommand::DeleteNodeCommand | ( | GraphDocument * | graph, |
| NodeId | nodeId | ||
| ) |
Definition at line 13 of file DeleteNodeCommand.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 20 of file DeleteNodeCommand.cpp.
References Olympe::NodeGraph::GraphDocument::DeleteNode(), GetComponentTypeID_Static(), Olympe::NodeGraph::GraphDocument::GetLinks(), Olympe::NodeGraph::GraphDocument::GetNode(), m_graph, m_nodeId, m_savedLinks, m_savedNode, and m_wasExecuted.
Here is the call graph for this function:
|
overridevirtual |
Get description of the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 56 of file DeleteNodeCommand.cpp.
|
overridevirtual |
Undo the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 44 of file DeleteNodeCommand.cpp.
References Olympe::NodeGraph::GraphDocument::GetNodesRef(), m_graph, m_savedNode, and m_wasExecuted.
Here is the call graph for this function:
|
private |
Definition at line 29 of file DeleteNodeCommand.h.
|
private |
Definition at line 30 of file DeleteNodeCommand.h.
Referenced by Execute().
|
private |
Definition at line 32 of file DeleteNodeCommand.h.
Referenced by Execute().
|
private |
Definition at line 31 of file DeleteNodeCommand.h.
Definition at line 33 of file DeleteNodeCommand.h.