ufe 5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
|
Abstract base class for undoable command manager. More...
#include <undoableCommandMgr.h>
Public Types | |
typedef std::shared_ptr< UndoableCommandMgr > | Ptr |
Public Member Functions | |
UndoableCommandMgr (const UndoableCommandMgr &)=delete | |
Constructors. More... | |
UndoableCommandMgr & | operator= (const UndoableCommandMgr &)=delete |
virtual | ~UndoableCommandMgr () |
Destructor. More... | |
virtual void | executeCmd (const UndoableCommand::Ptr &cmd) const |
The method directly executes the command i.e., not undoable execution. More... | |
Static Public Member Functions | |
static UndoableCommandMgr & | instance () |
static void | initializeInstance (const Ptr &instance) |
Protected Member Functions | |
virtual void | registerCmd (const UndoableCommand::Ptr &cmd) const |
The method registers the command (i.e. without executing it) to the undo queue. More... | |
UndoableCommandMgr () | |
Only derived classes can create an undoable command manager. More... | |
Friends | |
class | UndoableCommandGuard |
Abstract base class for undoable command manager.
Certain UFE clients will make changes to a data model by using Ufe::UndoableCommand and want those changes to generate application-level undoable commands. This singleton class allows an application to provide this functionality by registering a concrete implementation of UndableCommandMgr.
If the application doesn't support an undo queue, the concrete implementation only has to execute the command which is the default behaviour of the class.
Note that there will be only one instance of the undoable command manager in the application.
Definition at line 34 of file undoableCommandMgr.h.
typedef std::shared_ptr<UndoableCommandMgr> Ufe::UndoableCommandMgr::Ptr |
Definition at line 38 of file undoableCommandMgr.h.
|
delete |
Constructors.
|
virtual |
Destructor.
|
protected |
Only derived classes can create an undoable command manager.
|
virtual |
The method directly executes the command i.e., not undoable execution.
|
static |
Initialize the command manager singleton. The application should call this once at startup to initialize the instance and once at shut down for clean-up.
instance | The command manager instance or null to remove the existing instance. |
std::invalid_argument | if the instance is initialized with a non-null pointer more than once. |
|
static |
|
delete |
|
protectedvirtual |
The method registers the command (i.e. without executing it) to the undo queue.
|
friend |
Definition at line 65 of file undoableCommandMgr.h.