![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
CommandStack - Manages undo/redo command history Maintains two stacks for undo and redo operations. More...
#include <CommandSystem.h>
Public Member Functions | |
| CommandStack () | |
| ~CommandStack () | |
| void | ExecuteCommand (std::unique_ptr< EditorCommand > cmd) |
| void | Undo () |
| void | Redo () |
| bool | CanUndo () const |
| bool | CanRedo () const |
| const EditorCommand * | GetLastCommand () const |
| std::string | GetLastCommandDescription () const |
| std::string | GetNextRedoDescription () const |
| std::vector< std::string > | GetUndoStackDescriptions () const |
| std::vector< std::string > | GetRedoStackDescriptions () const |
| void | Clear () |
| size_t | GetUndoStackSize () const |
| size_t | GetRedoStackSize () const |
Private Attributes | |
| std::vector< std::unique_ptr< EditorCommand > > | m_UndoStack |
| std::vector< std::unique_ptr< EditorCommand > > | m_RedoStack |
| size_t | m_MaxStackSize |
CommandStack - Manages undo/redo command history Maintains two stacks for undo and redo operations.
Definition at line 45 of file CommandSystem.h.
| Olympe::CommandStack::CommandStack | ( | ) |
Definition at line 15 of file CommandSystem.cpp.
| Olympe::CommandStack::~CommandStack | ( | ) |
Definition at line 20 of file CommandSystem.cpp.
References Clear().
Here is the call graph for this function:
|
inline |
Definition at line 62 of file CommandSystem.h.
References m_RedoStack.
Referenced by Olympe::BlueprintEditor::CanRedo().
Here is the caller graph for this function:
|
inline |
Definition at line 61 of file CommandSystem.h.
References m_UndoStack.
Referenced by Olympe::BlueprintEditor::CanUndo().
Here is the caller graph for this function:| void Olympe::CommandStack::Clear | ( | ) |
Definition at line 137 of file CommandSystem.cpp.
References m_RedoStack, and m_UndoStack.
Referenced by ~CommandStack().
Here is the caller graph for this function:| void Olympe::CommandStack::ExecuteCommand | ( | std::unique_ptr< EditorCommand > | cmd | ) |
Definition at line 25 of file CommandSystem.cpp.
References GetComponentTypeID_Static(), m_MaxStackSize, m_RedoStack, and m_UndoStack.
Referenced by Olympe::NodeGraphPanel::HandleKeyboardShortcuts(), Olympe::NodeGraphPanel::HandleNodeInteractions(), and Olympe::NodeGraphPanel::RenderGraph().
Here is the call graph for this function:
Here is the caller graph for this function:| const EditorCommand * Olympe::CommandStack::GetLastCommand | ( | ) | const |
Definition at line 90 of file CommandSystem.cpp.
References m_UndoStack.
| std::string Olympe::CommandStack::GetLastCommandDescription | ( | ) | const |
Definition at line 99 of file CommandSystem.cpp.
References Olympe::EditorCommand::GetDescription(), and m_UndoStack.
Referenced by Olympe::BlueprintEditor::GetLastCommandDescription().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Olympe::CommandStack::GetNextRedoDescription | ( | ) | const |
Definition at line 108 of file CommandSystem.cpp.
References m_RedoStack.
Referenced by Olympe::BlueprintEditor::GetNextRedoDescription().
Here is the caller graph for this function:| std::vector< std::string > Olympe::CommandStack::GetRedoStackDescriptions | ( | ) | const |
Definition at line 127 of file CommandSystem.cpp.
References GetComponentTypeID_Static(), and m_RedoStack.
Here is the call graph for this function:
|
inline |
Definition at line 78 of file CommandSystem.h.
References m_RedoStack.
| std::vector< std::string > Olympe::CommandStack::GetUndoStackDescriptions | ( | ) | const |
Definition at line 117 of file CommandSystem.cpp.
References GetComponentTypeID_Static(), and m_UndoStack.
Here is the call graph for this function:
|
inline |
Definition at line 77 of file CommandSystem.h.
References m_UndoStack.
| void Olympe::CommandStack::Redo | ( | ) |
Definition at line 70 of file CommandSystem.cpp.
References GetComponentTypeID_Static(), m_RedoStack, and m_UndoStack.
Referenced by Olympe::BlueprintEditor::Redo().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::CommandStack::Undo | ( | ) |
Definition at line 50 of file CommandSystem.cpp.
References GetComponentTypeID_Static(), m_RedoStack, and m_UndoStack.
Referenced by Olympe::BlueprintEditor::Undo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 83 of file CommandSystem.h.
Referenced by ExecuteCommand().
|
private |
Definition at line 82 of file CommandSystem.h.
Referenced by CanRedo(), Clear(), ExecuteCommand(), GetNextRedoDescription(), GetRedoStackDescriptions(), GetRedoStackSize(), Redo(), and Undo().
|
private |
Definition at line 81 of file CommandSystem.h.
Referenced by CanUndo(), Clear(), ExecuteCommand(), GetLastCommand(), GetLastCommandDescription(), GetUndoStackDescriptions(), GetUndoStackSize(), Redo(), and Undo().