MaterialX 1.39.1
|
An iterator object representing the state of an upstream graph traversal. More...
#include <Traversal.h>
Public Member Functions | |
GraphIterator (ElementPtr elem) | |
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. | |
GraphIterator & | operator++ () |
Iterate to the next edge in the traversal. More... | |
Elements | |
ElementPtr | getDownstreamElement () const |
Return the downstream element of the current edge. | |
ElementPtr | getConnectingElement () const |
Return the connecting element, if any, of the current edge. | |
ElementPtr | getUpstreamElement () const |
Return the upstream element of the current edge. | |
size_t | getUpstreamIndex () const |
Return the index of the current edge within the range of upstream edges available to the downstream element. | |
Depth | |
size_t | getElementDepth () const |
Return the element depth of the current traversal, where a single edge between two elements represents a depth of one. | |
size_t | getNodeDepth () const |
Return the node depth of the current traversal, where a single edge between two nodes represents a depth of one. | |
Pruning | |
void | setPruneSubgraph (bool prune) |
Set the prune subgraph flag, which controls whether the current subgraph is pruned from traversal. More... | |
bool | getPruneSubgraph () const |
Return the prune subgraph flag, which controls whether the current subgraph is pruned from traversal. | |
Range Methods | |
GraphIterator & | begin (size_t holdCount=0) |
Interpret this object as an iteration range, and return its begin iterator. | |
static const GraphIterator & | end () |
Return the sentinel end iterator for this class. | |
An iterator object representing the state of an upstream graph traversal.
GraphIterator & operator++ | ( | ) |
Iterate to the next edge in the traversal.
ExceptionFoundCycle | if a cycle is encountered. |
|
inline |
Set the prune subgraph flag, which controls whether the current subgraph is pruned from traversal.
prune | If set to true, then the current subgraph will be pruned. |