![]() |
NDEVR
API Documentation
|
Forward declaration of the central design object registry. More...
Public Member Functions | |
| DesignCommand () | |
| Default constructor. | |
| DesignCommand (const DesignCommand &command)=default | |
| Default copy constructor. | |
| virtual | ~DesignCommand () |
| Virtual destructor. | |
| virtual bool | addTarget (UUID) |
| Adds a target object by UUID to this command. | |
| virtual bool | canCombineWith (const DynamicPointer< DesignCommand > &) |
| Checks whether this command can be combined with another command into a single operation. | |
| virtual bool | canGroupWith (const DynamicPointer< DesignCommand > &) |
| Checks whether this command can be grouped with another command for batch execution. | |
| virtual void | combineWith (const DynamicPointer< DesignCommand > &command) |
| Combines this command with another compatible command, merging their operations. | |
| virtual void | execute (DesignObjectLookup *) |
| Executes this command against the given DesignObjectLookup. | |
| virtual StringView | icon () const =0 |
| Gets the icon identifier for this command. | |
| virtual bool | isAsyncExecution () const |
| Whether this command should be executed asynchronously. | |
| virtual TranslatedString | name () const =0 |
| Gets the human-readable name of this command for display in the UI. | |
| void | setUndoRedoID (UUID undo_redo_group) |
| Sets the undo-redo group identifier for this command. | |
| UUID | undoRedoID () const |
| Gets the undo-redo group identifier for this command. | |
Public Attributes | |
| bool | can_undo = true |
| Whether this command supports being undone. | |
| bool | has_executed = false |
| Whether this command has already been executed. | |
| UUID | id |
| Unique identifier for this command instance. | |
| bool | is_undo = false |
| Whether this command represents an undo operation. | |
| LogPtr | log |
| Log pipe for reporting command progress and errors. | |
| Time | time = Constant<Time>::Invalid |
| Timestamp of when the command was created or executed. | |
| bool | update_project_modified = true |
| Whether executing this command should mark the project as modified. | |
Protected Attributes | |
| UUID | m_undo_redo_group |
| The undo-redo group this command belongs to, for batch undo/redo. | |
Forward declaration of the central design object registry.
A command for safely modifying something in a DesignObjectLookup. Modifications will be done in a separate thread from the UI and will be recorded for undo-redo. Most user modifications of data should occur via a DesignCommand.
Definition at line 54 of file DesignCommand.h.
| DesignCommand::DesignCommand | ( | ) |
Default constructor.
Initializes the command with default values.
Referenced by DesignCommand(), ModelTileCommand::ModelTileCommand(), NewModelCommand::NewModelCommand(), SetLayerCommand::SetLayerCommand(), SetProperty< t_property, t_type >::SetProperty(), and VisibleCommand::VisibleCommand().
|
default |
Default copy constructor.
| [in] | command | The command to copy from. |
References DesignCommand().
|
inlinevirtual |
Adds a target object by UUID to this command.
| [in] | target | The UUID of the target design object. |
Reimplemented in ClearMaterialDescendentsCommand, DesignCommandGroup, ManagedDesignCommand, ModelTileCommand, NewMaterialCommand, NewModelCommand, SetLayerCommand, SetMaterialCommand, SetPaletteCommand, SetProperties< t_property, t_type >, SetPropertiesCommand, SetProperty< t_property, t_type >, SetTextValue, and VisibleCommand.
Definition at line 91 of file DesignCommand.h.
|
inlinevirtual |
Checks whether this command can be combined with another command into a single operation.
| [in] | command | The other command to check combination compatibility with. |
Reimplemented in ManagedDesignCommand, and ModelTileCommand.
Definition at line 80 of file DesignCommand.h.
|
inlinevirtual |
Checks whether this command can be grouped with another command for batch execution.
| [in] | command | The other command to check grouping compatibility with. |
Reimplemented in ManagedDesignCommand, and ModelTileCommand.
Definition at line 74 of file DesignCommand.h.
|
virtual |
Combines this command with another compatible command, merging their operations.
| [in] | command | The command to combine with this one. |
Reimplemented in ManagedDesignCommand, and ModelTileCommand.
|
inlinevirtual |
Executes this command against the given DesignObjectLookup.
| [in] | lookup | The design object registry to modify. |
Reimplemented in ClearMaterialDescendentsCommand, DesignCommandGroup, ManagedDesignCommand, ModelTileCommand, NewMaterialCommand, NewModelCommand, SetLayerCommand, SetMaterialCommand, SetPaletteCommand, SetProperties< t_property, t_type >, SetPropertiesCommand, SetProperty< t_property, t_type >, SetTextValue, and VisibleCommand.
Definition at line 68 of file DesignCommand.h.
|
pure virtual |
Gets the icon identifier for this command.
Implemented in ClearMaterialDescendentsCommand, DesignCommandGroup, ManagedDesignCommand, ModelTileCommand, NewMaterialCommand, NewModelCommand, SetLayerCommand, SetMaterialCommand, SetPaletteCommand, SetProperties< t_property, t_type >, SetPropertiesCommand, SetProperty< t_property, t_type >, SetTextValue, and VisibleCommand.
|
inlinevirtual |
Whether this command should be executed asynchronously.
Reimplemented in DesignCommandGroup, ManagedDesignCommand, and ModelTileCommand.
Definition at line 85 of file DesignCommand.h.
|
pure virtual |
Gets the human-readable name of this command for display in the UI.
Implemented in ClearMaterialDescendentsCommand, DesignCommandGroup, ManagedDesignCommand, ModelTileCommand, NewMaterialCommand, NewModelCommand, SetLayerCommand, SetMaterialCommand, SetPaletteCommand, SetProperties< t_property, t_type >, SetPropertiesCommand, SetProperty< t_property, t_type >, SetTextValue, and VisibleCommand.
| void DesignCommand::setUndoRedoID | ( | UUID | undo_redo_group | ) |
Sets the undo-redo group identifier for this command.
| [in] | undo_redo_group | The UUID of the undo-redo group this command belongs to. |
| UUID DesignCommand::undoRedoID | ( | ) | const |
Gets the undo-redo group identifier for this command.