ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkUndoSet Class Reference

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

#include <vtkUndoSet.h>

Inherits vtkObject.

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int Undo ()
 Perform an Undo. More...
 
virtual int Redo ()
 Perform a Redo. More...
 
int AddElement (vtkUndoElement *elem)
 Add an element to this set. More...
 
void RemoveElement (int index)
 Remove an element at a particular index. More...
 
vtkUndoElementGetElement (int index)
 Get an element at a particular index. More...
 
void RemoveAllElements ()
 Remove all elemments. More...
 
int GetNumberOfElements ()
 Get number of elements in the set. More...
 

Static Public Member Functions

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

Protected Member Functions

 vtkUndoSet ()
 
 ~vtkUndoSet ()
 

Protected Attributes

vtkCollection * Collection
 
vtkCollection * TmpWorkingCollection
 

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 42 of file vtkUndoSet.h.

Member Typedef Documentation

§ Superclass

typedef vtkObject vtkUndoSet::Superclass

Definition at line 46 of file vtkUndoSet.h.

Constructor & Destructor Documentation

§ vtkUndoSet()

vtkUndoSet::vtkUndoSet ( )
protected

§ ~vtkUndoSet()

vtkUndoSet::~vtkUndoSet ( )
protected

Member Function Documentation

§ New()

static vtkUndoSet* vtkUndoSet::New ( )
static

§ GetClassName()

virtual const char* vtkUndoSet::GetClassName ( )
virtual

§ IsTypeOf()

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

§ IsA()

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

§ SafeDownCast()

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

§ PrintSelf()

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

§ Undo()

virtual int vtkUndoSet::Undo ( )
virtual

Perform an Undo.

§ Redo()

virtual int vtkUndoSet::Redo ( )
virtual

Perform a Redo.

§ AddElement()

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.

§ RemoveElement()

void vtkUndoSet::RemoveElement ( int  index)

Remove an element at a particular index.

§ GetElement()

vtkUndoElement* vtkUndoSet::GetElement ( int  index)

Get an element at a particular index.

§ RemoveAllElements()

void vtkUndoSet::RemoveAllElements ( )

Remove all elemments.

§ GetNumberOfElements()

int vtkUndoSet::GetNumberOfElements ( )

Get number of elements in the set.

Member Data Documentation

§ Collection

vtkCollection* vtkUndoSet::Collection
protected

Definition at line 93 of file vtkUndoSet.h.

§ TmpWorkingCollection

vtkCollection* vtkUndoSet::TmpWorkingCollection
protected

Definition at line 94 of file vtkUndoSet.h.


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