![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Creates a link between two pins. More...
#include <ConnectPinsCommand.h>
Inheritance diagram for Olympe::NodeGraph::ConnectPinsCommand:
Collaboration diagram for Olympe::NodeGraph::ConnectPinsCommand:Public Member Functions | |
| ConnectPinsCommand (GraphDocument *graph, PinId fromPin, PinId toPin) | |
| 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 |
| PinId | m_fromPin |
| PinId | m_toPin |
| LinkId | m_createdLinkId |
Creates a link between two pins.
Definition at line 20 of file ConnectPinsCommand.h.
| Olympe::NodeGraph::ConnectPinsCommand::ConnectPinsCommand | ( | GraphDocument * | graph, |
| PinId | fromPin, | ||
| PinId | toPin | ||
| ) |
Definition at line 13 of file ConnectPinsCommand.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 20 of file ConnectPinsCommand.cpp.
References Olympe::NodeGraph::GraphDocument::ConnectPins(), m_createdLinkId, m_fromPin, m_graph, and m_toPin.
Here is the call graph for this function:
|
overridevirtual |
Get description of the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 36 of file ConnectPinsCommand.cpp.
|
overridevirtual |
Undo the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 28 of file ConnectPinsCommand.cpp.
References Olympe::NodeGraph::GraphDocument::DisconnectLink(), m_createdLinkId, m_graph, and Olympe::NodeGraph::LinkId::value.
Here is the call graph for this function:
|
private |
Definition at line 32 of file ConnectPinsCommand.h.
|
private |
Definition at line 30 of file ConnectPinsCommand.h.
Referenced by Execute().
|
private |
Definition at line 29 of file ConnectPinsCommand.h.
|
private |
Definition at line 31 of file ConnectPinsCommand.h.
Referenced by Execute().