frepple::utils::CommandManager Class Reference

This class allows management of tasks with supporting commiting them, rolling them back, and setting bookmarks which can be undone and redone. More...

#include <utils.h>

Inheritance diagram for frepple::utils::CommandManager:

Classes

class  Bookmark
 
class  iterator
 
class  reverse_iterator
 

Public Member Functions

void add (Command *c)
 
iterator begin ()
 
 CommandManager ()
 
void commit ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
void redoBookmark (Bookmark *)
 
reverse_iterator rend ()
 
void rollback (Bookmark *)
 
void rollback ()
 
BookmarksetBookmark ()
 
void undoBookmark (Bookmark *)
 
 ~CommandManager ()
 

Detailed Description

This class allows management of tasks with supporting commiting them, rolling them back, and setting bookmarks which can be undone and redone.

Definition at line 4111 of file utils.h.

Constructor & Destructor Documentation

frepple::utils::CommandManager::CommandManager ( )
inline

Constructor.

Definition at line 4243 of file utils.h.

frepple::utils::CommandManager::~CommandManager ( )
inline

Destructor.

Definition at line 4250 of file utils.h.

Member Function Documentation

void frepple::utils::CommandManager::add ( Command c)
inline

Add a command to the active bookmark.

Definition at line 4273 of file utils.h.

iterator frepple::utils::CommandManager::begin ( )
inline

Returns an iterator over all bookmarks in forward direction.

Definition at line 4261 of file utils.h.

void frepple::utils::CommandManager::commit ( )

Commit all commands.

Definition at line 208 of file utils/actions.cpp.

iterator frepple::utils::CommandManager::end ( )
inline

Returns an iterator beyond the last bookmark in forward direction.

Definition at line 4264 of file utils.h.

reverse_iterator frepple::utils::CommandManager::rbegin ( )
inline

Returns an iterator over all bookmarks in reverse direction.

Definition at line 4267 of file utils.h.

void frepple::utils::CommandManager::redoBookmark ( CommandManager::Bookmark b)

Redo all commands in a bookmark (and its children).
It can later still be undone.
The active bookmark in the manager is set to the argument bookmark.

Definition at line 156 of file utils/actions.cpp.

reverse_iterator frepple::utils::CommandManager::rend ( )
inline

Returns an iterator beyond the last bookmark in reverse direction.

Definition at line 4270 of file utils.h.

void frepple::utils::CommandManager::rollback ( CommandManager::Bookmark b)

Undo all commands in a bookmark (and its children).
It can no longer be redone. The bookmark does however still exist.

Definition at line 172 of file utils/actions.cpp.

void frepple::utils::CommandManager::rollback ( )

Rolling back all commands.

Definition at line 224 of file utils/actions.cpp.

CommandManager::Bookmark * frepple::utils::CommandManager::setBookmark ( )

Create a new bookmark.

Definition at line 127 of file utils/actions.cpp.

void frepple::utils::CommandManager::undoBookmark ( CommandManager::Bookmark b)

Undo all commands in a bookmark (and its children).
It can later be redone.
The active bookmark in the manager is set to the parent of argument bookmark.

Definition at line 138 of file utils/actions.cpp.


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