Iterator over all children of a node. More...
#include <SgUctTree.h>
Public Member Functions | |
SgUctChildIterator (const SgUctTree &tree, const SgUctNode &node) | |
Constructor. | |
const SgUctNode & | operator* () const |
void | operator++ () |
operator bool () const | |
Private Attributes | |
const SgUctNode * | m_current |
const SgUctNode * | m_last |
Iterator over all children of a node.
It was intentionally implemented to be used only, if at least one child exists (checked with an assertion), since in many use cases, the case of no children needs to be handled specially and should be checked before doing a loop over all children.
Definition at line 1060 of file SgUctTree.h.
Constructor.
Requires: node.HasChildren()
Definition at line 1079 of file SgUctTree.h.
References SgUctTree::Contains(), SgUctNode::FirstChild(), SgUctNode::HasChildren(), m_current, m_last, SgUctNode::NuChildren(), SG_ASSERT, and SG_DEBUG_ONLY.
SgUctChildIterator::operator bool | ( | ) | const |
Definition at line 1099 of file SgUctTree.h.
const SgUctNode & SgUctChildIterator::operator* | ( | ) | const |
Definition at line 1089 of file SgUctTree.h.
References m_current.
void SgUctChildIterator::operator++ | ( | ) |
Definition at line 1094 of file SgUctTree.h.
References m_current.
const SgUctNode* SgUctChildIterator::m_current [private] |
Definition at line 1074 of file SgUctTree.h.
Referenced by operator bool(), operator*(), operator++(), and SgUctChildIterator().
const SgUctNode* SgUctChildIterator::m_last [private] |
Definition at line 1076 of file SgUctTree.h.
Referenced by operator bool(), and SgUctChildIterator().