A container command to group a series of commands together. More...
#include <utils.h>

Classes | |
class | iterator |
Public Member Functions | |
void | add (Command *c) |
iterator | begin () const |
CommandList () | |
virtual void | commit () |
bool | empty () const |
iterator | end () const |
void | redo () |
virtual void | rollback () |
virtual void | undo () |
virtual | ~CommandList () |
Detailed Description
A container command to group a series of commands together.
This class implements the "composite" design pattern in order to get an efficient and intuitive hierarchical grouping of commands.
Constructor & Destructor Documentation
frepple::utils::CommandList::CommandList | ( | ) | [inline, explicit] |
frepple::utils::CommandList::~CommandList | ( | ) | [virtual] |
Destructor.
A commandlist should only be deleted when all of its commands have been committed or undone. If this is not the case a warning will be printed.
Definition at line 117 of file utils/actions.cpp.
Member Function Documentation
void frepple::utils::CommandList::add | ( | Command * | c | ) |
Append an additional command to the end of the list.
Definition at line 42 of file utils/actions.cpp.
iterator frepple::utils::CommandList::begin | ( | ) | const [inline] |
void frepple::utils::CommandList::commit | ( | ) | [virtual] |
Commits all actions on its list.
At the end it also clears the list of actions.
Reimplemented from frepple::utils::Command.
Definition at line 92 of file utils/actions.cpp.
bool frepple::utils::CommandList::empty | ( | ) | const [inline] |
iterator frepple::utils::CommandList::end | ( | ) | const [inline] |
void frepple::utils::CommandList::redo | ( | ) | [virtual] |
Redoes all actions on its list.
The list of actions is left intact, so the changes can still be undone.
Reimplemented from frepple::utils::Command.
Definition at line 109 of file utils/actions.cpp.
void frepple::utils::CommandList::rollback | ( | ) | [virtual] |
Undoes all actions on the list.
At the end it also clears the list of actions.
Reimplemented from frepple::utils::Command.
Definition at line 62 of file utils/actions.cpp.
void frepple::utils::CommandList::undo | ( | ) | [virtual] |
Undoes all actions on its list.
The list of actions is left intact, so the changes can still be redone.
Reimplemented from frepple::utils::Command.
Definition at line 81 of file utils/actions.cpp.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
