ufe  1.0
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 Member Functions

 ~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...
 
 CompositeUndoableCommand ()
 Constructors. More...
 
 CompositeUndoableCommand (std::initializer_list< Ptr > undoableCommands)
 Constructors. More...
 
 CompositeUndoableCommand (const std::list< Ptr > &undoableCommands)
 Constructors. More...
 
- Public Member Functions inherited from Ufe::UndoableCommand
virtual ~UndoableCommand ()
 Destructor. More...
 

Static Public Member Functions

static std::shared_ptr< CompositeUndoableCommandcreate (std::initializer_list< Ptr > undoableCommands)
 

Private Types

typedef std::list< PtrCmdList
 

Private Member Functions

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

Private Attributes

CmdList fCmds
 

Additional Inherited Members

- Public Types inherited from Ufe::UndoableCommand
typedef std::shared_ptr< UndoableCommandPtr
 
- 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 62 of file undoableCommand.h.

Member Typedef Documentation

◆ CmdList

typedef std::list<Ptr> Ufe::CompositeUndoableCommand::CmdList
private

Definition at line 97 of file undoableCommand.h.

Constructor & Destructor Documentation

◆ CompositeUndoableCommand() [1/4]

Ufe::CompositeUndoableCommand::CompositeUndoableCommand ( )

Constructors.

◆ CompositeUndoableCommand() [2/4]

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

Constructors.

◆ CompositeUndoableCommand() [3/4]

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

Constructors.

◆ ~CompositeUndoableCommand()

Ufe::CompositeUndoableCommand::~CompositeUndoableCommand ( )
override

Destructor.

◆ CompositeUndoableCommand() [4/4]

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.

◆ create()

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 99 of file undoableCommand.h.


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