HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TreeIterator Class Reference

#include <Traversal.h>

Public Member Functions

 TreeIterator (ElementPtr elem)
 
 ~TreeIterator ()
 
bool operator== (const TreeIterator &rhs) const
 
bool operator!= (const TreeIterator &rhs) const
 
ElementPtr operator* () const
 
TreeIteratoroperator++ ()
 Iterate to the next element in the traversal. More...
 
Elements
ElementPtr getElement () const
 Return the current element in the traversal. More...
 
Depth
size_t getElementDepth () const
 
Pruning
void setPruneSubtree (bool prune)
 
bool getPruneSubtree () const
 

Range Methods

TreeIteratorbegin (size_t holdCount=0)
 
static const TreeIteratorend ()
 Return the sentinel end iterator for this class. More...
 

Detailed Description

An iterator object representing the state of a tree traversal.

See Also
Element::traverseTree

Definition at line 88 of file Traversal.h.

Constructor & Destructor Documentation

TreeIterator::TreeIterator ( ElementPtr  elem)
inlineexplicit

Definition at line 91 of file Traversal.h.

TreeIterator::~TreeIterator ( )
inline

Definition at line 97 of file Traversal.h.

Member Function Documentation

TreeIterator& TreeIterator::begin ( size_t  holdCount = 0)
inline

Interpret this object as an iteration range, and return its begin iterator.

Definition at line 169 of file Traversal.h.

static const TreeIterator& TreeIterator::end ( )
static

Return the sentinel end iterator for this class.

ElementPtr TreeIterator::getElement ( ) const
inline

Return the current element in the traversal.

Definition at line 128 of file Traversal.h.

size_t TreeIterator::getElementDepth ( ) const
inline

Return the element depth of the current traversal, where the starting element represents a depth of zero.

Definition at line 139 of file Traversal.h.

bool TreeIterator::getPruneSubtree ( ) const
inline

Return the prune subtree flag, which controls whether the current subtree is pruned from traversal.

Definition at line 158 of file Traversal.h.

bool TreeIterator::operator!= ( const TreeIterator rhs) const
inline

Definition at line 109 of file Traversal.h.

ElementPtr TreeIterator::operator* ( ) const
inline

Dereference this iterator, returning the current element in the traversal.

Definition at line 116 of file Traversal.h.

TreeIterator& TreeIterator::operator++ ( )

Iterate to the next element in the traversal.

bool TreeIterator::operator== ( const TreeIterator rhs) const
inline

Definition at line 103 of file Traversal.h.

void TreeIterator::setPruneSubtree ( bool  prune)
inline

Set the prune subtree flag, which controls whether the current subtree is pruned from traversal.

Parameters
pruneIf set to true, then the current subtree will be pruned.

Definition at line 151 of file Traversal.h.


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