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::CompositeUndoableCommand Class Reference

Composite undoable command. More...

#include <undoableCommand.h>

Inheritance diagram for Ufe::CompositeUndoableCommand:
Collaboration diagram for Ufe::CompositeUndoableCommand:

Public Types

typedef std::list< PtrCmdList
 
- Public Types inherited from Ufe::UndoableCommand
typedef std::shared_ptr< UndoableCommandPtr
 

Public Member Functions

 CompositeUndoableCommand ()
 Constructors. More...
 
 CompositeUndoableCommand (std::initializer_list< Ptr > undoableCommands)
 
 CompositeUndoableCommand (const std::list< Ptr > &undoableCommands)
 
 CompositeUndoableCommand (const Ptr &undoableCommand)
 
 ~CompositeUndoableCommand () override
 Destructor. More...
 
void execute () override
 Calls execute() on each command in the list, in forward order. More...
 
void undo () override
 Calls undo() on each command in the list, in reverse order. More...
 
void redo () override
 Calls redo() on each command in the list, in forward order. More...
 
void append (const Ptr &cmd)
 Append the argument to the list of commands. More...
 
const CmdListcmdsList () const
 Returns the list of undoable commands. More...
 
- Public Member Functions inherited from Ufe::UndoableCommand
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
 

Static Public Member Functions

static std::shared_ptr< CompositeUndoableCommandcreate (std::initializer_list< Ptr > undoableCommands)
 
static std::shared_ptr< CompositeUndoableCommandcreate (const std::list< Ptr > &undoableCommands)
 
static std::shared_ptr< CompositeUndoableCommandcreate (const Ptr &undoableCommand)
 

Private Member Functions

 CompositeUndoableCommand (const CompositeUndoableCommand &)=delete
 Deleting copy constructor. More...
 

Private Attributes

CmdList fCmds
 

Additional Inherited Members

- Protected Member Functions inherited from Ufe::UndoableCommand
 UndoableCommand ()
 Constructor. More...
 
 UndoableCommand (const UndoableCommand &)=delete
 Deleting copy constructor. More...
 

Detailed Description

Composite undoable command.

This base class implements the Composite pattern

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

for undoable commands.

Definition at line 73 of file undoableCommand.h.

Member Typedef Documentation

◆ CmdList

Definition at line 76 of file undoableCommand.h.

Constructor & Destructor Documentation

◆ CompositeUndoableCommand() [1/5]

Ufe::CompositeUndoableCommand::CompositeUndoableCommand ( )

Constructors.

◆ CompositeUndoableCommand() [2/5]

Ufe::CompositeUndoableCommand::CompositeUndoableCommand ( std::initializer_list< Ptr undoableCommands)

◆ CompositeUndoableCommand() [3/5]

Ufe::CompositeUndoableCommand::CompositeUndoableCommand ( const std::list< Ptr > &  undoableCommands)

◆ CompositeUndoableCommand() [4/5]

Ufe::CompositeUndoableCommand::CompositeUndoableCommand ( const Ptr undoableCommand)

◆ ~CompositeUndoableCommand()

Ufe::CompositeUndoableCommand::~CompositeUndoableCommand ( )
override

Destructor.

◆ CompositeUndoableCommand() [5/5]

Ufe::CompositeUndoableCommand::CompositeUndoableCommand ( const CompositeUndoableCommand )
privatedelete

Deleting copy constructor.

Member Function Documentation

◆ append()

void Ufe::CompositeUndoableCommand::append ( const Ptr cmd)

Append the argument to the list of commands.

◆ cmdsList()

const CmdList & Ufe::CompositeUndoableCommand::cmdsList ( ) const

Returns the list of undoable commands.

◆ create() [1/3]

static std::shared_ptr< CompositeUndoableCommand > Ufe::CompositeUndoableCommand::create ( const Ptr undoableCommand)
static

◆ create() [2/3]

static std::shared_ptr< CompositeUndoableCommand > Ufe::CompositeUndoableCommand::create ( const std::list< Ptr > &  undoableCommands)
static

◆ create() [3/3]

static std::shared_ptr< CompositeUndoableCommand > Ufe::CompositeUndoableCommand::create ( std::initializer_list< Ptr undoableCommands)
static

Create the composite command and append the argument commands to it.

Returns
Pointer to the composite undoable command.

◆ execute()

void Ufe::CompositeUndoableCommand::execute ( )
overridevirtual

Calls execute() on each command in the list, in forward order.

Reimplemented from Ufe::UndoableCommand.

◆ redo()

void Ufe::CompositeUndoableCommand::redo ( )
overridevirtual

Calls redo() on each command in the list, in forward order.

Implements Ufe::UndoableCommand.

◆ undo()

void Ufe::CompositeUndoableCommand::undo ( )
overridevirtual

Calls undo() on each command in the list, in reverse order.

Implements Ufe::UndoableCommand.

Member Data Documentation

◆ fCmds

CmdList Ufe::CompositeUndoableCommand::fCmds
private

Definition at line 121 of file undoableCommand.h.


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