|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
Groups multiple commands into a single undoable operation. More...
#include <Command.h>
Inherits DekiEditor::Command.
Public Member Functions | |
| CompoundCommand (const std::string &description, std::vector< std::unique_ptr< Command > > commands) | |
| CompoundCommand (const CompoundCommand &)=delete | |
| CompoundCommand & | operator= (const CompoundCommand &)=delete |
| std::string | GetDescription () const override |
| Human-readable description for UI display. | |
| void | Execute () override |
| Execute the command. | |
| void | Undo () override |
| Undo the command. | |
| void | Redo () override |
| Redo the command (default: calls Execute). | |
| bool | ReferencesAny (const DeadMemory &dead) const override |
| Report whether this command holds a raw pointer to anything in dead. | |
| Public Member Functions inherited from DekiEditor::Command | |
| virtual | ~Command ()=default |
| virtual bool | CanMerge (const Command *other) const |
| Check if this command can merge with another. | |
| virtual void | Merge (const Command *other) |
| Merge another command into this one. | |
Groups multiple commands into a single undoable operation.
|
inlineexplicit |
|
delete |
|
delete |
|
inlineoverridevirtual |
Human-readable description for UI display.
Implements DekiEditor::Command.
|
inlineoverridevirtual |
Execute the command.
Implements DekiEditor::Command.
|
inlineoverridevirtual |
Undo the command.
Implements DekiEditor::Command.
|
inlineoverridevirtual |
Redo the command (default: calls Execute).
Reimplemented from DekiEditor::Command.
|
inlineoverridevirtual |
Report whether this command holds a raw pointer to anything in dead.
CommandHistory calls this when the scene is about to free objects, and discards any command that answers true — running Undo()/Redo() on a command whose target has been freed is a use-after-free.
The default is false, which is correct for commands that address their target by value or by id. Any command storing a DekiObject*, DekiComponent*, or Scene* MUST override this; see the implementations in src/core/commands/ for the pattern.
Reimplemented from DekiEditor::Command.