Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkCollectionIterator Class Reference

`#include <vtkCollectionIterator.h>`

Inheritance diagram for vtkCollectionIterator:

[legend]
Collaboration diagram for vtkCollectionIterator:

[legend]
List of all members.

## Detailed Description

iterator through a vtkCollection.

Date:
  2002/12/26 18:24:21

Revision:
  1.2

vtkCollectionIterator provides an alternative way to traverse through the objects in a vtkCollection. Unlike the collection's built in interface, this allows multiple iterators to simultaneously traverse the collection. If items are removed from the collection, only the iterators currently pointing to those items are invalidated. Other iterators will still continue to function normally.

Created by:
  - King, Brad

CVS contributions (if > 5%):
  - King, Brad (96%)

CVS logs (CVSweb):
  - .`h` (`/Common/vtkCollectionIterator.h)`
  - .`cxx` (`/Common/vtkCollectionIterator.cxx)`

Definition at line 49 of file vtkCollectionIterator.h.

## Public Types
typedef vtkObject | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
void | InitTraversal ()
void | GoToFirstItem ()
void | GoToNextItem ()
int | IsDoneWithTraversal ()
vtkObject * | GetObject ()
virtual void | SetCollection (vtkCollection *)
virtual vtkCollection * | GetCollection ()
## Static Public Methods
int | IsTypeOf (const char *type)
vtkCollectionIterator * | SafeDownCast (vtkObject *o)
vtkCollectionIterator * | New ()
## Protected Methods
| vtkCollectionIterator ()
| ~vtkCollectionIterator ()
## Protected Attributes
vtkCollection * | Collection
vtkCollectionElement * | Element

## Member Typedef Documentation

typedef vtkObject vtkCollectionIterator::Superclass

| Reimplemented from vtkObject. Reimplemented in vtkDataArrayCollectionIterator. Definition at line 52 of file vtkCollectionIterator.h.

## Constructor & Destructor Documentation

vtkCollectionIterator::vtkCollectionIterator | ( |  | ) | `[protected]`

vtkCollectionIterator::~vtkCollectionIterator | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkCollectionIterator::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject. Reimplemented in vtkDataArrayCollectionIterator.

int vtkCollectionIterator::IsTypeOf | ( | const char * | type | ) | `[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 vtkDataArrayCollectionIterator.

virtual int vtkCollectionIterator::IsA | ( | const char * | type | ) | `[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 vtkDataArrayCollectionIterator.

vtkCollectionIterator* vtkCollectionIterator::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject. Reimplemented in vtkDataArrayCollectionIterator.

void vtkCollectionIterator::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 vtkDataArrayCollectionIterator.

vtkCollectionIterator* vtkCollectionIterator::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. Reimplemented in vtkDataArrayCollectionIterator.

virtual void vtkCollectionIterator::SetCollection | ( | vtkCollection * |  | ) | `[virtual]`

| Set/Get the collection over which to iterate. Reimplemented in vtkDataArrayCollectionIterator.

virtual vtkCollection* vtkCollectionIterator::GetCollection | ( |  | ) | `[virtual]`

| Set/Get the collection over which to iterate.

void vtkCollectionIterator::InitTraversal | ( |  | ) | `[inline]`

| Position the iterator at the first item in the collection. Definition at line 63 of file vtkCollectionIterator.h.

void vtkCollectionIterator::GoToFirstItem | ( |  | ) |

| Position the iterator at the first item in the collection.

void vtkCollectionIterator::GoToNextItem | ( |  | ) |

| Move the iterator to the next item in the collection.

int vtkCollectionIterator::IsDoneWithTraversal | ( |  | ) |

| Test whether the iterator is currently positioned at a valid item. Returns 1 for yes, 0 for no.

vtkObject* vtkCollectionIterator::GetObject | ( |  | ) |

| Get the item at the current iterator position. Valid only when IsDoneWithTraversal() returns 1.

## Member Data Documentation

vtkCollection* vtkCollectionIterator::Collection`[protected]`

| Definition at line 84 of file vtkCollectionIterator.h.

vtkCollectionElement* vtkCollectionIterator::Element`[protected]`

| Definition at line 87 of file vtkCollectionIterator.h.

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

- Common/vtkCollectionIterator.h