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:

List of all members.

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 3896 of file utils.h.


Constructor & Destructor Documentation

frepple::utils::CommandManager::CommandManager ( ) [inline]

Constructor.

Definition at line 4028 of file utils.h.

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

Destructor.

Definition at line 4035 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 4058 of file utils.h.

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

Returns an iterator over all bookmarks in forward direction.

Definition at line 4046 of file utils.h.

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

Commit all commands.

Reimplemented in frepple::SolverMRP::SolverMRPdata.

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

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

Returns an iterator beyond the last bookmark in forward direction.

Definition at line 4049 of file utils.h.

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

Returns an iterator over all bookmarks in reverse direction.

Definition at line 4052 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 163 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 4055 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 179 of file utils/actions.cpp.

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

Rolling back all commands.

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

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

Create a new bookmark.

Definition at line 134 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 145 of file utils/actions.cpp.


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

Documentation generated for frePPLe by  doxygen