SDFormat Editor
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CommandI Class Referenceabstract

The command class encapsulates the interactions between the various interfaces of the SDFormat Editor, providing undo/redo functionality when applicable. More...

#include <command_interface.h>

Inheritance diagram for CommandI:
Inheritance graph
Collaboration diagram for CommandI:
Collaboration graph

Public Member Functions

virtual bool Execute ()=0
 Execution of the command. Must be implemented as applicable by the derived class.
 
virtual bool ExecuteUndo ()=0
 Execution of the undo command. Must be implemented as applicable by the derived class.
 
virtual bool ExecuteRedo ()=0
 Execution of the redo command. Must be implemented as applicable by the derived class.
 
virtual bool IsUndoable ()=0
 Undo functionality of the command.
 
virtual bool IsRedoable ()=0
 Redo functionality of the command.
 
virtual bool IsThreaded (bool &prevent_user_input)=0
 Indicates if this command should be run in a thread.
 
virtual bool ChangesProgramStateIrreversibly ()=0
 Indicates if this command is an irreversible state-changing command.
 

Detailed Description

The command class encapsulates the interactions between the various interfaces of the SDFormat Editor, providing undo/redo functionality when applicable.

Member Function Documentation

◆ ChangesProgramStateIrreversibly()

virtual bool CommandI::ChangesProgramStateIrreversibly ( )
pure virtual

Indicates if this command is an irreversible state-changing command.

Returns
True if this command changes the state of the program irreversibly

Implemented in AddElementCommand, CloseModelViewerCommand, CreateFileCommand, DeleteElementCommand, GenericCommand, ModifyAttributeCommand< T >, ModifyElementCommand< T >, OpenFileCommand, OpenModelViewerCommand, RenderModelCommand, and SaveFileCommand.

◆ Execute()

virtual bool CommandI::Execute ( )
pure virtual

Execution of the command. Must be implemented as applicable by the derived class.

Returns
True if the command has been executed

Implemented in SaveFileCommand, AddElementCommand, CloseModelViewerCommand, CreateFileCommand, DeleteElementCommand, GenericCommand, ModifyAttributeCommand< T >, ModifyElementCommand< T >, OpenFileCommand, OpenModelViewerCommand, and RenderModelCommand.

◆ ExecuteRedo()

virtual bool CommandI::ExecuteRedo ( )
pure virtual

Execution of the redo command. Must be implemented as applicable by the derived class.

Returns
True if the command is redo-able and has been redone

Implemented in AddElementCommand, CloseModelViewerCommand, CreateFileCommand, DeleteElementCommand, GenericCommand, ModifyAttributeCommand< T >, ModifyElementCommand< T >, OpenFileCommand, OpenModelViewerCommand, RenderModelCommand, and SaveFileCommand.

◆ ExecuteUndo()

virtual bool CommandI::ExecuteUndo ( )
pure virtual

Execution of the undo command. Must be implemented as applicable by the derived class.

Returns
True if the command undo-able and has been undone

Implemented in AddElementCommand, CloseModelViewerCommand, CreateFileCommand, DeleteElementCommand, GenericCommand, ModifyAttributeCommand< T >, ModifyElementCommand< T >, OpenFileCommand, OpenModelViewerCommand, RenderModelCommand, and SaveFileCommand.

◆ IsRedoable()

virtual bool CommandI::IsRedoable ( )
pure virtual

◆ IsThreaded()

virtual bool CommandI::IsThreaded ( bool &  prevent_user_input)
pure virtual

Indicates if this command should be run in a thread.

Parameters
[out]prevent_user_inputindicates if user input should be prevented if this happens to be a threaded command
Returns
True if this command should be run in a thread

Implemented in AddElementCommand, CloseModelViewerCommand, CreateFileCommand, DeleteElementCommand, GenericCommand, ModifyAttributeCommand< T >, ModifyElementCommand< T >, OpenFileCommand, OpenModelViewerCommand, RenderModelCommand, and SaveFileCommand.

◆ IsUndoable()

virtual bool CommandI::IsUndoable ( )
pure virtual

The documentation for this class was generated from the following file: