ufe 6.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
Ufe::UndoableCommand Class Referenceabstract

Abstract base class for undoable commands. More...

#include <undoableCommand.h>

Inheritance diagram for Ufe::UndoableCommand:

Public Types

typedef std::shared_ptr< UndoableCommandPtr
 

Public Member Functions

virtual ~UndoableCommand ()
 Destructor. More...
 
virtual std::string commandString () const
 Get a user friendly string representation of the command. More...
 
virtual void execute ()
 
virtual void undo ()=0
 
virtual void redo ()=0
 

Protected Member Functions

 UndoableCommand ()
 Constructor. More...
 
 UndoableCommand (const UndoableCommand &)=delete
 Deleting copy constructor. More...
 

Detailed Description

Abstract base class for undoable commands.

This base class defines the trivial interface to implement the Command pattern

https://en.wikipedia.org/wiki/Command_pattern

for interactive multi-level undo.

Definition at line 36 of file undoableCommand.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<UndoableCommand> Ufe::UndoableCommand::Ptr

Definition at line 39 of file undoableCommand.h.

Constructor & Destructor Documentation

◆ ~UndoableCommand()

virtual Ufe::UndoableCommand::~UndoableCommand ( )
virtual

Destructor.

◆ UndoableCommand() [1/2]

Ufe::UndoableCommand::UndoableCommand ( )
protected

Constructor.

◆ UndoableCommand() [2/2]

Ufe::UndoableCommand::UndoableCommand ( const UndoableCommand )
protecteddelete

Deleting copy constructor.

Member Function Documentation

◆ commandString()

virtual std::string Ufe::UndoableCommand::commandString ( ) const
inlinevirtual

Get a user friendly string representation of the command.

Note
For example, an application can print out the executed command to give an hint to the user of what was sucessfully done.

Definition at line 47 of file undoableCommand.h.

◆ execute()

virtual void Ufe::UndoableCommand::execute ( )
virtual

Initial execution of the command, which should be called exactly once. Implementation in this class calls redo().

Reimplemented in Ufe::BatchCompositeCommand, and Ufe::CompositeUndoableCommand.

◆ redo()

◆ undo()


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