#include <SgNode.h>
Definition at line 546 of file SgNode.h.
| Public Member Functions | |
| SgNodeConstIterator (const SgNode *rootOfSubtree, bool postOrder=false) | |
| Create an iterator for iterating through all nodes in the subtree of 'rootOfSubtree', including the node itself. | |
| bool | Next () | 
| Find next node in the tree. | |
| void | Abort () | 
| Abort the iteration. | |
| void | operator++ () | 
| const SgNode * | operator * () const | 
| operator bool () const | |
| Private Member Functions | |
| SgNodeConstIterator (const SgNodeConstIterator &) | |
| Not implemented. | |
| SgNodeConstIterator & | operator= (const SgNodeConstIterator &) | 
| Not implemented. | |
| Private Attributes | |
| bool | m_postOrder | 
| const SgNode *const | m_rootOfSubtree | 
| const SgNode * | m_nextNode | 
| SgNodeConstIterator::SgNodeConstIterator | ( | const SgNode * | rootOfSubtree, | |
| bool | postOrder = false | |||
| ) | 
Create an iterator for iterating through all nodes in the subtree of 'rootOfSubtree', including the node itself.
If 'preOrder' (default), return internal nodes before their sons; if 'postOrder', then return the leaves before the internal nodes.
Definition at line 786 of file SgNode.cpp.
References SgNode::HasSon(), SgNode::LeftMostSon(), m_nextNode, m_postOrder, and m_rootOfSubtree.
| SgNodeConstIterator::SgNodeConstIterator | ( | const SgNodeConstIterator & | ) |  [private] | 
Not implemented.
| void SgNodeConstIterator::Abort | ( | ) | 
Abort the iteration.
The next call to operator bool will return false.
Definition at line 562 of file SgNode.h.
References m_nextNode.
| bool SgNodeConstIterator::Next | ( | ) | 
Find next node in the tree.
Return false when done with all nodes.
Definition at line 831 of file SgNode.cpp.
References SgNode::Father(), SgNode::HasFather(), SgNode::HasRightBrother(), SgNode::HasSon(), SgNode::LeftMostSon(), m_nextNode, m_postOrder, m_rootOfSubtree, SgNode::NextDepthFirst(), SgNode::RightBrother(), and SG_ASSERT.
Referenced by operator++().
| const SgNode* SgNodeConstIterator::operator * | ( | ) | const | 
| SgNodeConstIterator::operator bool | ( | ) | const | 
| void SgNodeConstIterator::operator++ | ( | ) | 
| SgNodeConstIterator& SgNodeConstIterator::operator= | ( | const SgNodeConstIterator & | ) |  [private] | 
Not implemented.
| const SgNode* SgNodeConstIterator::m_nextNode  [private] | 
Definition at line 589 of file SgNode.h.
Referenced by Abort(), Next(), operator *(), operator bool(), operator++(), and SgNodeConstIterator().
| bool SgNodeConstIterator::m_postOrder  [private] | 
| const SgNode* const SgNodeConstIterator::m_rootOfSubtree  [private] |