Iterator for traversing a tree depth-first. More...
#include <SgUctTree.h>
Public Member Functions | |
SgUctTreeIterator (const SgUctTree &tree) | |
const SgUctNode & | operator* () const |
void | operator++ () |
operator bool () const | |
Private Attributes | |
const SgUctTree & | m_tree |
const SgUctNode * | m_current |
std::stack< boost::shared_ptr < SgUctChildIterator > > | m_stack |
Stack of child iterators. |
Iterator for traversing a tree depth-first.
Definition at line 1108 of file SgUctTree.h.
SgUctTreeIterator::SgUctTreeIterator | ( | const SgUctTree & | tree | ) |
Definition at line 442 of file SgUctTree.cpp.
SgUctTreeIterator::operator bool | ( | ) | const |
Definition at line 481 of file SgUctTree.cpp.
References m_current.
const SgUctNode & SgUctTreeIterator::operator* | ( | ) | const |
Definition at line 448 of file SgUctTree.cpp.
References m_current.
void SgUctTreeIterator::operator++ | ( | ) |
Definition at line 453 of file SgUctTree.cpp.
References SgUctNode::HasChildren(), m_current, m_stack, m_tree, and SG_ASSERT.
const SgUctNode* SgUctTreeIterator::m_current [private] |
Definition at line 1122 of file SgUctTree.h.
Referenced by operator bool(), operator*(), and operator++().
std::stack<boost::shared_ptr<SgUctChildIterator> > SgUctTreeIterator::m_stack [private] |
Stack of child iterators.
The elements are owned by the stack (shared_ptr is only used because auto_ptr should not be used with standard containers)
Definition at line 1127 of file SgUctTree.h.
Referenced by operator++().
const SgUctTree& SgUctTreeIterator::m_tree [private] |
Definition at line 1120 of file SgUctTree.h.
Referenced by operator++().