MaterialX  1.38.5
Public Member Functions | List of all members
TreeIterator Class Reference

An iterator object representing the state of a tree traversal. More...

#include <Traversal.h>

Public Member Functions

 TreeIterator (ElementPtr elem)
 
bool operator== (const TreeIterator &rhs) const
 
bool operator!= (const TreeIterator &rhs) const
 
ElementPtr operator* () const
 Dereference this iterator, returning the current element in the traversal.
 
TreeIteratoroperator++ ()
 Iterate to the next element in the traversal.
 
Elements
ElementPtr getElement () const
 Return the current element in the traversal.
 
Depth
size_t getElementDepth () const
 Return the element depth of the current traversal, where the starting element represents a depth of zero.
 
Pruning
void setPruneSubtree (bool prune)
 Set the prune subtree flag, which controls whether the current subtree is pruned from traversal. More...
 
bool getPruneSubtree () const
 Return the prune subtree flag, which controls whether the current subtree is pruned from traversal.
 

Range Methods

TreeIteratorbegin (size_t holdCount=0)
 Interpret this object as an iteration range, and return its begin iterator.
 
static const TreeIteratorend ()
 Return the sentinel end iterator for this class.
 

Detailed Description

An iterator object representing the state of a tree traversal.

See also
Element::traverseTree

Member Function Documentation

◆ setPruneSubtree()

void 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.

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