![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Command to copy selected nodes to clipboard. More...
#include <BTGraphCommands.h>
Inheritance diagram for Olympe::CopyNodesCommand:
Collaboration diagram for Olympe::CopyNodesCommand:Public Member Functions | |
| CopyNodesCommand (NodeGraph *graph, const std::vector< int > &nodeIds) | |
| virtual | ~CopyNodesCommand ()=default |
| bool | Execute () override |
| Execute the command (forward operation) | |
| bool | Undo () override |
| Undo the command (reverse operation) | |
| std::string | GetDescription () const override |
| Get a human-readable description of the command. | |
Public Member Functions inherited from Olympe::GraphCommand | |
| virtual | ~GraphCommand ()=default |
| virtual bool | CanMergeWith (const GraphCommand &other) const |
| Check if this command can be merged with another Used for combining consecutive similar commands (e.g., multiple position changes) | |
| virtual bool | MergeWith (const GraphCommand &other) |
| Merge this command with another Called only if CanMergeWith returned true. | |
Private Attributes | |
| NodeGraph * | m_graph |
| std::vector< int > | m_nodeIds |
| std::vector< ClipboardNode > | m_clipboardData |
Command to copy selected nodes to clipboard.
Definition at line 27 of file BTGraphCommands.h.
| Olympe::CopyNodesCommand::CopyNodesCommand | ( | NodeGraph * | graph, |
| const std::vector< int > & | nodeIds | ||
| ) |
Definition at line 14 of file BTGraphCommands.cpp.
|
virtualdefault |
|
overridevirtual |
Execute the command (forward operation)
Implements Olympe::GraphCommand.
Definition at line 19 of file BTGraphCommands.cpp.
References Olympe::NodeGraph::CopyNodesToClipboard(), m_graph, and m_nodeIds.
Here is the call graph for this function:
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::GraphCommand.
Definition at line 34 of file BTGraphCommands.cpp.
References m_nodeIds.
|
overridevirtual |
Undo the command (reverse operation)
Implements Olympe::GraphCommand.
Definition at line 28 of file BTGraphCommands.cpp.
|
private |
Definition at line 40 of file BTGraphCommands.h.
|
private |
Definition at line 38 of file BTGraphCommands.h.
Referenced by Execute().
|
private |
Definition at line 39 of file BTGraphCommands.h.
Referenced by Execute(), and GetDescription().