VTK
|
Abstract class for iterator over a vtkTree. More...
#include <vtkTreeIterator.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkTreeIterator * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
vtkIdType | Next () |
bool | HasNext () |
void | Restart () |
void | SetTree (vtkTree *graph) |
virtual vtkTree * | GetTree () |
void | SetStartVertex (vtkIdType vertex) |
virtual vtkIdType | GetStartVertex () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkTreeIterator * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkTreeIterator () | |
~vtkTreeIterator () | |
virtual void | Initialize ()=0 |
virtual vtkIdType | NextInternal ()=0 |
Protected Attributes | |
vtkTree * | Tree |
vtkIdType | StartVertex |
vtkIdType | NextId |
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.
Definition at line 38 of file vtkTreeIterator.h.
typedef vtkObject vtkTreeIterator::Superclass |
Reimplemented from vtkObject.
Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.
Definition at line 41 of file vtkTreeIterator.h.
vtkTreeIterator::vtkTreeIterator | ( | ) | [protected] |
vtkTreeIterator::~vtkTreeIterator | ( | ) | [protected] |
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 | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.
virtual vtkObjectBase* vtkTreeIterator::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
Reimplemented in vtkTreeDFSIterator, and vtkTreeBFSIterator.
vtkTreeIterator* vtkTreeIterator::NewInstance | ( | ) | const |
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.
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.
vtkTree* vtkTreeIterator::Tree [protected] |
Definition at line 74 of file vtkTreeIterator.h.
vtkIdType vtkTreeIterator::StartVertex [protected] |
Definition at line 75 of file vtkTreeIterator.h.
vtkIdType vtkTreeIterator::NextId [protected] |
Definition at line 76 of file vtkTreeIterator.h.