Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

vtkIterator Class Reference

#include <vtkIterator.h>

Inheritance diagram for vtkIterator:

Inheritance graph
[legend]
Collaboration diagram for vtkIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

An iterator for vtkContainer subclasses.

vtkIterator is a superclass of all container iterators.

See also:
vtkContainer vtkExtensionsObject

Definition at line 33 of file vtkIterator.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkIterator, vtkExtensionsObject)
virtual vtkContainer * GetContainer (void) const
 Get the associated container.

Data Access Methods
virtual vtkIdType GetPosition (void) const
 Retrieve the position from the iterator.

virtual const char * GetKey (void) const
 Retrieve the key from the iterator.

virtual vtkObjectBase * GetObject (void) const
 Retrieve the data from the iterator.

virtual int SetObject (vtkObjectBase *object)=0
 Set the data at the iterator's position.

Traversal Methods
virtual int InitTraversal (void)=0
 Initialize traversal of the container.

virtual int Increment (void)=0
 Increment the iterator to the next location.

virtual int Decrement (void)=0
 Decrement the iterator to the previous location.


Protected Member Functions

 vtkIterator (void)
 ~vtkIterator ()
virtual void SetContainer (vtkContainer *)
 Set the container for this iterator.


Protected Attributes

vtkContainer * Container


Constructor & Destructor Documentation

vtkIterator::vtkIterator (  void   )  [protected]
 

vtkIterator::~vtkIterator (   )  [protected]
 


Member Function Documentation

virtual int vtkIterator::Decrement (  void   )  [pure virtual]
 

Decrement the iterator to the previous location.

Returns:
false if the container is empty, the iterator is at the start of the container, or this iterator has not been initialized to traverse any container, otherwise true.

Implemented in vtkObjectBaseHashMapIterator, vtkObjectBaseMapIterator, vtkObjectBasePriorityQueueIterator, vtkObjectBaseQueueIterator, vtkObjectBaseSetIterator, vtkObjectBaseStackIterator, and vtkObjectBaseVectorIterator.

virtual vtkContainer* vtkIterator::GetContainer (  void   )  const [virtual]
 

Get the associated container.

virtual const char* vtkIterator::GetKey (  void   )  const [virtual]
 

Retrieve the key from the iterator.

For associative containers, the key is the string paired with the data.

Returns:
The key if retrieved correctly, otherwise null.

Reimplemented in vtkObjectBaseHashMapIterator, and vtkObjectBaseMapIterator.

virtual vtkObjectBase* vtkIterator::GetObject (  void   )  const [virtual]
 

Retrieve the data from the iterator.

Returns:
The object if retrieved correctly, otherwise null.

Reimplemented in vtkDataSetMapIterator, vtkExtensionsObjectHashMapIterator, vtkExtensionsObjectMapIterator, vtkExtensionsObjectPriorityQueueIterator, vtkExtensionsObjectQueueIterator, vtkExtensionsObjectSetIterator, vtkExtensionsObjectStackIterator, vtkExtensionsObjectVectorIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseMapIterator, vtkObjectBasePriorityQueueIterator, vtkObjectBaseQueueIterator, vtkObjectBaseSetIterator, vtkObjectBaseStackIterator, vtkObjectBaseVectorIterator, vtkObjectHashMapIterator, vtkObjectMapIterator, vtkObjectPriorityQueueIterator, vtkObjectQueueIterator, vtkObjectSetIterator, vtkObjectStackIterator, vtkObjectVectorIterator, vtkPolyDataMapIterator, vtkPaletteElementHashMapIterator, vtkPaletteElementMapIterator, vtkPaletteHashMapIterator, and vtkPaletteMapIterator.

virtual vtkIdType vtkIterator::GetPosition (  void   )  const [virtual]
 

Retrieve the position from the iterator.

For non-associative containers, the position is the index of the element.

Returns:
The position if retrieved correctly, otherwise -1.

Reimplemented in vtkObjectBasePriorityQueueIterator, and vtkObjectBaseVectorIterator.

virtual int vtkIterator::Increment (  void   )  [pure virtual]
 

Increment the iterator to the next location.

Returns:
false if the container is empty, the iterator is at the end of the container, or this iterator has not been initialized to traverse any container, otherwise true.

Implemented in vtkObjectBaseHashMapIterator, vtkObjectBaseMapIterator, vtkObjectBasePriorityQueueIterator, vtkObjectBaseQueueIterator, vtkObjectBaseSetIterator, vtkObjectBaseStackIterator, and vtkObjectBaseVectorIterator.

virtual int vtkIterator::InitTraversal (  void   )  [pure virtual]
 

Initialize traversal of the container.

Sets the iterator to the "beginning" of the container.

Returns:
false if the container is empty or this iterator has not been initialized to traverse any container, otherwise true.

Implemented in vtkObjectBaseHashMapIterator, vtkObjectBaseMapIterator, vtkObjectBasePriorityQueueIterator, vtkObjectBaseQueueIterator, vtkObjectBaseSetIterator, vtkObjectBaseStackIterator, and vtkObjectBaseVectorIterator.

virtual void vtkIterator::SetContainer (  vtkContainer *   )  [protected, virtual]
 

Set the container for this iterator.

virtual int vtkIterator::SetObject (  vtkObjectBase *  object  )  [pure virtual]
 

Set the data at the iterator's position.

Returns:
true if the data were set correctly, otherwise false.

Implemented in vtkObjectBaseHashMapIterator, vtkObjectBaseMapIterator, vtkObjectBasePriorityQueueIterator, vtkObjectBaseQueueIterator, vtkObjectBaseSetIterator, vtkObjectBaseStackIterator, and vtkObjectBaseVectorIterator.

vtkIterator::vtkTypeRevisionMacro (  vtkIterator  ,
vtkExtensionsObject 
) 
 


Member Data Documentation

vtkContainer* vtkIterator::Container [protected]
 

Definition at line 108 of file vtkIterator.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 10 03:42:23 2004 for vtkExtensions by doxygen 1.3.7