![]() |
BlankMat 0.1.0
Free open-source 3D texture creation application
|
Command interface. Allows executing the command and undoing it. More...
Public Member Functions | |
virtual void | Execute ()=0 |
Executes this command. | |
virtual void | Undo ()=0 |
Attempts to undo this command. May not be possible for a specific command. | |
virtual bool | Combine (ICommand *&other)=0 |
Combine this command with another command if they modify the same variable. WARNING: If combined, the other command is deleted and will be nullptr. | |
bool | Undoable () const |
Returns whether the command is undoable. | |
bool | Trackable () const |
Returns whether the command is trackable (ie. should be stored in ActionStack) | |
virtual std::string | GetName () const =0 |
Returns the name of this command. | |
Protected Attributes | |
bool | mCanBeUndone = true |
bool | mTrackable = true |
Command interface. Allows executing the command and undoing it.
|
pure virtual |
Combine this command with another command if they modify the same variable. WARNING: If combined, the other command is deleted and will be nullptr.
other | Other command to combine with |
Implemented in AddValueCommand< T >, ChangeValueCommand< T >, RedoCommand, RunFunctionCommand, RunToggleFunctionCommand, and UndoCommand.
|
pure virtual |
Executes this command.
Implemented in AddValueCommand< T >, ChangeValueCommand< T >, RedoCommand, RunFunctionCommand, RunToggleFunctionCommand, and UndoCommand.
|
pure virtual |
Returns the name of this command.
Implemented in AddValueCommand< T >, ChangeValueCommand< T >, RedoCommand, RunFunctionCommand, RunToggleFunctionCommand, and UndoCommand.
|
inline |
Returns whether the command is trackable (ie. should be stored in ActionStack)
|
pure virtual |
Attempts to undo this command. May not be possible for a specific command.
Implemented in AddValueCommand< T >, ChangeValueCommand< T >, RedoCommand, RunFunctionCommand, RunToggleFunctionCommand, and UndoCommand.
|
inline |
Returns whether the command is undoable.
|
protected |
|
protected |