ParaView
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkUndoSet Class Reference

Maintains a collection of vtkUndoElement that can be undone/redone in a single step. More...

#include <vtkUndoSet.h>

Inheritance diagram for vtkUndoSet:
Inheritance graph
[legend]
Collaboration diagram for vtkUndoSet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual int Undo ()
virtual int Redo ()
int AddElement (vtkUndoElement *elem)
void RemoveElement (int index)
vtkUndoElementGetElement (int index)
void RemoveAllElements ()
int GetNumberOfElements ()

Static Public Member Functions

static vtkUndoSetNew ()
static int IsTypeOf (const char *type)
static vtkUndoSetSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkUndoSet ()
 ~vtkUndoSet ()

Protected Attributes

vtkCollectionCollection
vtkCollectionTmpWorkingCollection

Detailed Description

Maintains a collection of vtkUndoElement that can be undone/redone in a single step.

This is a concrete class that stores a collection of vtkUndoElement objects. A vtkUndoSet object represents an atomic undo-redoable operation. It can contain one or more vtkUndoElement objects. When added vtkUndoElement objects to a vtkUndoSet they must be added in the sequence of operation. When undoing the operations are performed in reverse order, while when redoing they are performed in forward order.

vtkUndoElement, vtkUndoSet and vtkUndoStack form the undo/redo framework core.

See also:
vtkUndoStack vtkUndoElement

Definition at line 40 of file vtkUndoSet.h.


Constructor & Destructor Documentation

vtkUndoSet::vtkUndoSet ( ) [protected]
vtkUndoSet::~vtkUndoSet ( ) [protected]

Member Function Documentation

static vtkUndoSet* vtkUndoSet::New ( ) [static]

Reimplemented from vtkObject.

virtual const char* vtkUndoSet::GetClassName ( ) [virtual]

Reimplemented from vtkObject.

static int vtkUndoSet::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkObject.

virtual int vtkUndoSet::IsA ( const char *  type) [virtual]

Reimplemented from vtkObject.

static vtkUndoSet* vtkUndoSet::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkObject.

void vtkUndoSet::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

virtual int vtkUndoSet::Undo ( ) [virtual]

Perform an Undo.

virtual int vtkUndoSet::Redo ( ) [virtual]

Perform a Redo.

int vtkUndoSet::AddElement ( vtkUndoElement elem)

Add an element to this set. If the newly added element, elem, and the most recently added element are both Mergeable, then an attempt is made to merge the new element with the previous one. On successful merging, the new element is discarded, otherwise it is appended to the set.

Returns:
the index at which the element got added/merged.
void vtkUndoSet::RemoveElement ( int  index)

Remove an element at a particular index.

vtkUndoElement* vtkUndoSet::GetElement ( int  index)

Get an element at a particular index

void vtkUndoSet::RemoveAllElements ( )

Remove all elemments.

int vtkUndoSet::GetNumberOfElements ( )

Get number of elements in the set.


Member Data Documentation

Definition at line 77 of file vtkUndoSet.h.

Definition at line 78 of file vtkUndoSet.h.


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