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 const char * GetClassName ()
virtual int IsA (const char *type)
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 (vtkObject *o)

Protected Member Functions

 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 37 of file vtkTreeIterator.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

Definition at line 40 of file vtkTreeIterator.h.


Constructor & Destructor Documentation

vtkTreeIterator::vtkTreeIterator ( ) [protected]
vtkTreeIterator::~vtkTreeIterator ( ) [protected]

Member Function Documentation

virtual const char* vtkTreeIterator::GetClassName ( ) [virtual]

Reimplemented from vtkObject.

Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.

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.

static vtkTreeIterator* vtkTreeIterator::SafeDownCast ( vtkObject o) [static]

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.

void vtkTreeIterator::SetStartVertex ( vtkIdType  vertex)

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.

virtual vtkIdType vtkTreeIterator::GetStartVertex ( ) [virtual]

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.

vtkIdType vtkTreeIterator::Next ( )

The next vertex visited in the graph.

bool vtkTreeIterator::HasNext ( )

Return true when all vertices have been visited.

void vtkTreeIterator::Restart ( )

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 73 of file vtkTreeIterator.h.

Definition at line 74 of file vtkTreeIterator.h.

Definition at line 75 of file vtkTreeIterator.h.


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