Section: Visualization Toolkit Common Classes
To create an instance of class vtkCollectionIterator, simply invoke its constructor as follows
obj = vtkCollectionIterator
obj
is an instance of the vtkCollectionIterator class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkCollectionIterator = obj.NewInstance ()
vtkCollectionIterator = obj.SafeDownCast (vtkObject o)
obj.SetCollection (vtkCollection )
- Set/Get the collection over which to iterate.
vtkCollection = obj.GetCollection ()
- Set/Get the collection over which to iterate.
obj.InitTraversal ()
- Position the iterator at the first item in the collection.
obj.GoToFirstItem ()
- Position the iterator at the first item in the collection.
obj.GoToNextItem ()
- Move the iterator to the next item in the collection.
int = obj.IsDoneWithTraversal ()
- Test whether the iterator is currently positioned at a valid item.
Returns 1 for yes, 0 for no.
vtkObject = obj.GetCurrentObject ()
- Get the item at the current iterator position. Valid only when
IsDoneWithTraversal() returns 1.
vtkObject = obj.GetObject ()
- @deprecated Replaced by vtkCollectionIterator::GetCurrentObject() as
of VTK 5.0.