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

#include <Traversal.h>

Public Member Functions

 GraphIterator (ElementPtr elem)
 
 ~GraphIterator ()
 
bool operator== (const GraphIterator &rhs) const
 
bool operator!= (const GraphIterator &rhs) const
 
Edge operator* () const
 Dereference this iterator, returning the current edge in the traversal. More...
 
GraphIteratoroperator++ ()
 
Elements
ElementPtr getDownstreamElement () const
 Return the downstream element of the current edge. More...
 
ElementPtr getConnectingElement () const
 Return the connecting element, if any, of the current edge. More...
 
ElementPtr getUpstreamElement () const
 Return the upstream element of the current edge. More...
 
size_t getUpstreamIndex () const
 
Depth
size_t getElementDepth () const
 
size_t getNodeDepth () const
 
Pruning
void setPruneSubgraph (bool prune)
 
bool getPruneSubgraph () const
 

Range Methods

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

Detailed Description

An iterator object representing the state of an upstream graph traversal.

See Also
Element::traverseGraph

Definition at line 191 of file Traversal.h.

Constructor & Destructor Documentation

GraphIterator::GraphIterator ( ElementPtr  elem)
inlineexplicit

Definition at line 194 of file Traversal.h.

GraphIterator::~GraphIterator ( )
inline

Definition at line 201 of file Traversal.h.

Member Function Documentation

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

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

Definition at line 299 of file Traversal.h.

static const GraphIterator& GraphIterator::end ( )
static

Return the sentinel end iterator for this class.

ElementPtr GraphIterator::getConnectingElement ( ) const
inline

Return the connecting element, if any, of the current edge.

Definition at line 241 of file Traversal.h.

ElementPtr GraphIterator::getDownstreamElement ( ) const
inline

Return the downstream element of the current edge.

Definition at line 235 of file Traversal.h.

size_t GraphIterator::getElementDepth ( ) const
inline

Return the element depth of the current traversal, where a single edge between two elements represents a depth of one.

Definition at line 265 of file Traversal.h.

size_t GraphIterator::getNodeDepth ( ) const

Return the node depth of the current traversal, where a single edge between two nodes represents a depth of one.

bool GraphIterator::getPruneSubgraph ( ) const
inline

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

Definition at line 288 of file Traversal.h.

ElementPtr GraphIterator::getUpstreamElement ( ) const
inline

Return the upstream element of the current edge.

Definition at line 247 of file Traversal.h.

size_t GraphIterator::getUpstreamIndex ( ) const
inline

Return the index of the current edge within the range of upstream edges available to the downstream element.

Definition at line 254 of file Traversal.h.

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

Definition at line 214 of file Traversal.h.

Edge GraphIterator::operator* ( ) const
inline

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

Definition at line 220 of file Traversal.h.

GraphIterator& GraphIterator::operator++ ( )

Iterate to the next edge in the traversal.

Exceptions
ExceptionFoundCycleif a cycle is encountered.
bool GraphIterator::operator== ( const GraphIterator rhs) const
inline

Definition at line 208 of file Traversal.h.

void GraphIterator::setPruneSubgraph ( bool  prune)
inline

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

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

Definition at line 281 of file Traversal.h.


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