|
Cogs.Core
|
Public Member Functions | |
| SetFieldCommand (EditorState *state, EntityIds entityIds, FieldInfo fieldInfo, T fieldData) | |
| void | close () override |
| Close command, i.e. prevent merging with another command. | |
| void | apply () override |
| Run the command. | |
| void | undo () override |
| bool | mergeWith (const EditorCommand *command) override |
Public Member Functions inherited from Cogs::Core::EditorCommand | |
| EditorCommand (EditorState *state, Context *context) | |
| virtual void | apply ()=0 |
| Run the command. | |
| virtual void | undo ()=0 |
| virtual void | redo () |
| virtual bool | mergeWith (const EditorCommand *) |
| virtual MeshHandle | applyMesh (MeshHandle) |
| Workaround for having extendable mesh processing available without linking (e.g command -> RR). | |
| virtual void | close () |
| Close command, i.e. prevent merging with another command. | |
| bool | isClosed () const |
| bool | merge (const EditorCommand *command) |
| Merge into this if not this is closed. | |
Private Attributes | |
| EntityIds | entityIds |
| FieldInfo | fieldInfo |
| T | fieldData |
| std::vector< T > | previousDatas |
Additional Inherited Members | |
Public Attributes inherited from Cogs::Core::EditorCommand | |
| std::vector< ParsedValue > | options |
| Options passed to the command when running in batch mode. | |
| bool | permanentUndo = false |
| True if cannot Redo after Undo. | |
Protected Attributes inherited from Cogs::Core::EditorCommand | |
| EditorState * | state = nullptr |
| Context * | context = nullptr |
Definition at line 14 of file FieldCommands.h.
|
inline |
Definition at line 16 of file FieldCommands.h.
|
inlineoverridevirtual |
Run the command.
In batch scripts this method is called for all type of commands. In interactive mode this method is not called for model commands (subclasses of ModalEditorCommand)
Implements Cogs::Core::EditorCommand.
Definition at line 26 of file FieldCommands.h.
References Cogs::ComponentModel::Entity::getComponent(), Cogs::Core::EntityStore::getEntityPtr(), Cogs::Reflection::TypeDatabase::getType(), and Cogs::Core::Context::store.
|
inlineoverridevirtual |
Close command, i.e. prevent merging with another command.
Reimplemented from Cogs::Core::EditorCommand.
Definition at line 21 of file FieldCommands.h.
|
inlineoverridevirtual |
Check if the action in the given command should be merged into this. I.e. Multiple field-changes commands merged info one for undoing all-in-one. Client code shall use
Reimplemented from Cogs::Core::EditorCommand.
Definition at line 60 of file FieldCommands.h.
|
inlineoverridevirtual |
Implements Cogs::Core::EditorCommand.
Definition at line 43 of file FieldCommands.h.
|
private |
Definition at line 82 of file FieldCommands.h.
|
private |
Definition at line 84 of file FieldCommands.h.
|
private |
Definition at line 83 of file FieldCommands.h.
|
private |
Definition at line 86 of file FieldCommands.h.