VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkTreeIterator Class Reference

Abstract class for iterator over a vtkTree. More...

#include <vtkTreeIterator.h>

Inheritance diagram for vtkTreeIterator:
Inheritance graph
[legend]
Collaboration diagram for vtkTreeIterator:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkTreeIteratorNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
vtkIdType Next ()
bool HasNext ()
void Restart ()
void SetTree (vtkTree *graph)
virtual vtkTreeGetTree ()
void SetStartVertex (vtkIdType vertex)
virtual vtkIdType GetStartVertex ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkTreeIteratorSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkTreeIterator ()
 ~vtkTreeIterator ()
virtual void Initialize ()=0
virtual vtkIdType NextInternal ()=0

Protected Attributes

vtkTreeTree
vtkIdType StartVertex
vtkIdType NextId

Detailed Description

Abstract class for iterator over a vtkTree.

The base class for tree iterators vtkTreeBFSIterator and vtkTreeDFSIterator.

After setting up the iterator, the normal mode of operation is to set up a while(iter->HasNext()) loop, with the statement vtkIdType vertex = iter->Next() inside the loop.

See also:
vtkTreeBFSIterator vtkTreeDFSIterator

Definition at line 38 of file vtkTreeIterator.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

Definition at line 41 of file vtkTreeIterator.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkTreeIterator::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 vtkTreeDFSIterator, and vtkTreeBFSIterator.

virtual int vtkTreeIterator::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 vtkTreeDFSIterator, and vtkTreeBFSIterator.

Reimplemented from vtkObject.

Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

virtual vtkObjectBase* vtkTreeIterator::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkObject.

Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

Reimplemented from vtkObject.

Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

virtual void vtkTreeIterator::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 vtkTreeDFSIterator, and vtkTreeBFSIterator.

void vtkTreeIterator::SetTree ( vtkTree graph)

Set/get the graph to iterate over.

virtual vtkTree* vtkTreeIterator::GetTree ( ) [virtual]

Set/get the graph to iterate over.

The start vertex of the traversal. The tree iterator will only iterate over the subtree rooted at vertex. If not set (or set to a negative value), starts at the root of the tree.

The start vertex of the traversal. The tree iterator will only iterate over the subtree rooted at vertex. If not set (or set to a negative value), starts at the root of the tree.

The next vertex visited in the graph.

Return true when all vertices have been visited.

Reset the iterator to its start vertex.

virtual void vtkTreeIterator::Initialize ( ) [protected, pure virtual]

Implemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

virtual vtkIdType vtkTreeIterator::NextInternal ( ) [protected, pure virtual]

Implemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.


Member Data Documentation

Definition at line 74 of file vtkTreeIterator.h.

Definition at line 75 of file vtkTreeIterator.h.

Definition at line 76 of file vtkTreeIterator.h.


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