![]() |
ufe 6.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
|
Composite undoable command. More...
#include <undoableCommand.h>


Public Types | |
| typedef std::list< Ptr > | CmdList |
Public Types inherited from Ufe::UndoableCommand | |
| typedef std::shared_ptr< UndoableCommand > | Ptr |
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 CmdList & | cmdsList () 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< CompositeUndoableCommand > | create (std::initializer_list< Ptr > undoableCommands) |
| static std::shared_ptr< CompositeUndoableCommand > | create (const std::list< Ptr > &undoableCommands) |
| static std::shared_ptr< CompositeUndoableCommand > | create (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... | |
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.
| typedef std::list<Ptr> Ufe::CompositeUndoableCommand::CmdList |
Definition at line 76 of file undoableCommand.h.
| Ufe::CompositeUndoableCommand::CompositeUndoableCommand | ( | ) |
Constructors.
| Ufe::CompositeUndoableCommand::CompositeUndoableCommand | ( | std::initializer_list< Ptr > | undoableCommands | ) |
| Ufe::CompositeUndoableCommand::CompositeUndoableCommand | ( | const std::list< Ptr > & | undoableCommands | ) |
| Ufe::CompositeUndoableCommand::CompositeUndoableCommand | ( | const Ptr & | undoableCommand | ) |
|
override |
Destructor.
|
privatedelete |
Deleting copy constructor.
| void Ufe::CompositeUndoableCommand::append | ( | const Ptr & | cmd | ) |
Append the argument to the list of commands.
| const CmdList & Ufe::CompositeUndoableCommand::cmdsList | ( | ) | const |
Returns the list of undoable commands.
|
static |
|
static |
|
static |
Create the composite command and append the argument commands to it.
|
overridevirtual |
Calls execute() on each command in the list, in forward order.
Reimplemented from Ufe::UndoableCommand.
|
overridevirtual |
Calls redo() on each command in the list, in forward order.
Implements Ufe::UndoableCommand.
|
overridevirtual |
Calls undo() on each command in the list, in reverse order.
Implements Ufe::UndoableCommand.
|
private |
Definition at line 121 of file undoableCommand.h.