#include <vtkArrayIterator.h>
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 47 of file vtkArrayIterator.h.
virtual int | GetDataType ()=0 |
vtkArrayIterator () | |
~vtkArrayIterator () | |
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 |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkArrayIterator * | SafeDownCast (vtkObject *o) |
Reimplemented from vtkObject.
Reimplemented in vtkArrayIteratorTemplate< T >, and vtkBitArrayIterator.
Definition at line 50 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.
virtual const char* vtkArrayIterator::GetClassName | ( | ) | [virtual] |
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 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 vtkBitArrayIterator.
static vtkArrayIterator* vtkArrayIterator::SafeDownCast | ( | vtkObject * | o | ) | [static] |
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.