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


Constructor & Destructor Documentation

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

Constructor.

Definition at line 4140 of file utils.h.

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

Destructor.

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

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

Returns an iterator over all bookmarks in forward direction.

Definition at line 4158 of file utils.h.

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

Commit all commands.

Reimplemented in frepple::SolverMRP::SolverMRPdata.

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

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

Returns an iterator beyond the last bookmark in forward direction.

Definition at line 4161 of file utils.h.

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

Returns an iterator over all bookmarks in reverse direction.

Definition at line 4164 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 162 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 4167 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 178 of file utils/actions.cpp.

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

Rolling back all commands.

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

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

Create a new bookmark.

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


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

Documentation generated for frePPLe by  doxygen