VTK
|
Abstract superclass to iterate over elements in an vtkAbstractArray. More...
#include <vtkArrayIterator.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkArrayIterator * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | Initialize (vtkAbstractArray *array)=0 |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkArrayIterator * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
virtual int | GetDataType ()=0 |
vtkArrayIterator () | |
~vtkArrayIterator () |
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 48 of file vtkArrayIterator.h.
Reimplemented from vtkObject.
Reimplemented in vtkTypeTemplate< vtkArrayIteratorTemplate< T >, vtkArrayIterator >, vtkArrayIteratorTemplate< T >, and vtkBitArrayIterator.
Definition at line 51 of file vtkArrayIterator.h.
vtkArrayIterator::vtkArrayIterator | ( | ) | [protected] |
Get the data type from the underlying array. Returns 0 if no underlying array is present.
vtkArrayIterator::~vtkArrayIterator | ( | ) | [protected] |
Get the data type from the underlying array. Returns 0 if no underlying array is present.
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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkTypeTemplate< vtkArrayIteratorTemplate< T >, vtkArrayIterator >, and 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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkTypeTemplate< vtkArrayIteratorTemplate< T >, vtkArrayIterator >, and vtkBitArrayIterator.
static vtkArrayIterator* vtkArrayIterator::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
Reimplemented in vtkTypeTemplate< vtkArrayIteratorTemplate< T >, vtkArrayIterator >, and vtkBitArrayIterator.
virtual vtkObjectBase* vtkArrayIterator::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
Reimplemented in vtkTypeTemplate< vtkArrayIteratorTemplate< T >, vtkArrayIterator >, and vtkBitArrayIterator.
vtkArrayIterator* vtkArrayIterator::NewInstance | ( | ) | const |
Reimplemented from vtkObject.
Reimplemented in vtkTypeTemplate< vtkArrayIteratorTemplate< T >, vtkArrayIterator >, and 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.