vtkArrayIterator Class Reference

#include <vtkArrayIterator.h>

Inheritance diagram for vtkArrayIterator:

Inheritance graph
[legend]
Collaboration diagram for vtkArrayIterator:

Collaboration graph
[legend]

List of all members.


Detailed Description

Abstract superclass to iterate over elements in an vtkAbstractArray.

vtkArrayIterator is used to iterate over elements in any vtkAbstractArray subclass. The vtkArrayIteratorTemplateMacro is used to centralize the set of types supported by Execute methods. It also avoids duplication of long switch statement case lists. Note that in this macro VTK_TT is defined to be the type of the iterator for the given type of array. One must include the vtkArrayIteratorIncludes.h header file to provide for extending of this macro by addition of new iterators.

Example usage:

 vtkArrayIter* iter = array->NewIterator();
 switch(array->GetDataType())
   {
   vtkArrayIteratorTemplateMacro(myFunc(static_cast<VTK_TT*>(iter), arg2));
   }
 iter->Delete();

Definition at line 45 of file vtkArrayIterator.h.


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 void Initialize (vtkAbstractArray *array)=0
virtual int GetDataType ()=0

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkArrayIteratorSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkArrayIterator ()
 ~vtkArrayIterator ()

Member Typedef Documentation

Reimplemented from vtkObject.

Reimplemented in vtkArrayIteratorTemplate< T >, and vtkBitArrayIterator.

Definition at line 48 of file vtkArrayIterator.h.


Constructor & Destructor Documentation

vtkArrayIterator::vtkArrayIterator (  )  [protected]

vtkArrayIterator::~vtkArrayIterator (  )  [protected]


Member Function Documentation

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

Reimplemented from vtkObject.

Reimplemented in vtkBitArrayIterator.

static int vtkArrayIterator::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkBitArrayIterator.

virtual int vtkArrayIterator::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

Reimplemented in vtkBitArrayIterator.

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

Reimplemented from vtkObject.

Reimplemented in vtkBitArrayIterator.

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

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkArrayIteratorTemplate< T >, and vtkBitArrayIterator.

virtual void vtkArrayIterator::Initialize ( vtkAbstractArray array  )  [pure virtual]

Set the array this iterator will iterate over. After Initialize() has been called, the iterator is valid so long as the Array has not been modified (except using the iterator itself). If the array is modified, the iterator must be re-intialized.

Implemented in vtkArrayIteratorTemplate< T >, and vtkBitArrayIterator.

virtual int vtkArrayIterator::GetDataType (  )  [pure virtual]

Get the data type from the underlying array. Returns 0 if no underlying array is present.

Implemented in vtkArrayIteratorTemplate< T >, and vtkBitArrayIterator.


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

Generated on Wed Jun 3 18:53:33 2009 for VTK by  doxygen 1.5.6