Undoable Class Reference

interface to implement to get an UndoMemento for the object implementing this interface to get its current state. More...

#include <iundo.h>

Inheritance diagram for Undoable:
Inheritance graph
[legend]

Public Member Functions

virtual ~Undoable ()
virtual UndoMementoexportState () const =0
 export the current state via UndoMemento
virtual void importState (const UndoMemento *state)=0
 restore a previously stored memento

Detailed Description

interface to implement to get an UndoMemento for the object implementing this interface to get its current state.

greebo: This is the abstract base class for an Undoable object. Derive from this class if your instance/object should be Undoable.

The exportState method has to allocate a new UndoMemento with all the necessary object data and return its pointer, so it can be referenced to later.

The importState() method should re-import the values saved in the UndoMemento (could be named restoreFromMemento() as well).

Definition at line 66 of file iundo.h.


Constructor & Destructor Documentation

virtual Undoable::~Undoable (  )  [inline, virtual]

Definition at line 69 of file iundo.h.


Member Function Documentation

virtual UndoMemento* Undoable::exportState (  )  const [pure virtual]

export the current state via UndoMemento

Returns:
a memento that represents current state

Implemented in Face, and Brush.

virtual void Undoable::importState ( const UndoMemento state  )  [pure virtual]

restore a previously stored memento

Parameters:
state state that should be restored

Implemented in Face, and Brush.


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

Generated by  doxygen 1.6.2