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.

Author:
Sean McInerney
Version:
Revision
1.1.1.1
Date:
Date
2005/06/17 17:48:36
See also:
vtkContainer

Definition at line 37 of file vtkIterator.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkIterator, vtkObject)
void PrintSelf (ostream &, vtkIndent)
virtual vtkContainerGetContainer (void) const
 Get the associated container.

void Register (vtkObjectBase *)
 Increase the reference count (mark as used by another object).

void UnRegister (vtkObjectBase *)
 Decrease the reference count (release by another object).

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 vtkObjectBaseGetItem (void) const
 Retrieve the data from the iterator.

virtual int SetItem (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.

void ReportReferences (vtkGarbageCollector *)

Protected Attributes

vtkContainerContainer

Friends

class vtkContainer


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 vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, and vtkObjectBaseVectorIterator.

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

Get the associated container.

virtual vtkObjectBase* vtkIterator::GetItem void   )  const [virtual]
 

Retrieve the data from the iterator.

Returns:
The object if retrieved correctly, otherwise null.

Reimplemented in vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, vtkObjectBaseVectorIterator, vtkObjectDequeIterator, vtkObjectHashMapIterator, vtkObjectListIterator, vtkObjectMapIterator, vtkObjectSetIterator, and vtkObjectVectorIterator.

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 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 vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, 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 vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, 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 vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, and vtkObjectBaseVectorIterator.

void vtkIterator::PrintSelf ostream &  ,
vtkIndent 
[virtual]
 

Reimplemented from vtkObject.

Reimplemented in vtkAssociativeIterator, vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, vtkObjectBaseVectorIterator, vtkObjectDequeIterator, vtkObjectHashMapIterator, vtkObjectListIterator, vtkObjectMapIterator, vtkObjectSetIterator, vtkObjectVectorIterator, and vtkSequenceIterator.

void vtkIterator::Register vtkObjectBase  )  [virtual]
 

Increase the reference count (mark as used by another object).

Reimplemented from vtkObject.

void vtkIterator::ReportReferences vtkGarbageCollector *   )  [protected]
 

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

Set the container for this iterator.

virtual int vtkIterator::SetItem vtkObjectBase object  )  [pure virtual]
 

Set the data at the iterator's position.

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

Implemented in vtkObjectBaseDequeIterator, vtkObjectBaseHashMapIterator, vtkObjectBaseListIterator, vtkObjectBaseMapIterator, vtkObjectBaseSetIterator, and vtkObjectBaseVectorIterator.

void vtkIterator::UnRegister vtkObjectBase  )  [virtual]
 

Decrease the reference count (release by another object).

Reimplemented from vtkObject.

vtkIterator::vtkTypeRevisionMacro vtkIterator  ,
vtkObject 
 


Friends And Related Function Documentation

friend class vtkContainer [friend]
 

Definition at line 116 of file vtkIterator.h.


Member Data Documentation

vtkContainer* vtkIterator::Container [protected]
 

Definition at line 118 of file vtkIterator.h.


The documentation for this class was generated from the following file:
Generated on Thu Jul 14 14:39:57 2005 for vtkContainers by doxygen 1.3.6