#include <nodeiterator.h>
Inheritance diagram for NodeIterator:
Public Types | |
typedef NodeTraits< _Node >::_NonConstNode | _NonConstNode |
typedef NodeIterator< _Node > | iterator |
typedef NodeIterator< const _Node > | const_iterator |
typedef NodeIterator< _Node, _Ref, _Ptr > | _Self |
typedef std::forward_iterator_tag | iterator_category |
typedef _Node | value_type |
typedef _Ptr | pointer |
typedef _Ref | reference |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
Public Methods | |
NodeIterator () | |
The default constructor makes a 'past the end NodeIterator'. | |
NodeIterator (_Node *start) | |
Construct a NodeIterator beginning at the given Node. | |
virtual _Self * | construct () const |
virtual _Self * | clone (_Node *start=0) const |
Copy constructor. | |
virtual | ~NodeIterator () |
virtual reference | operator * () const |
Dereference operator. | |
virtual pointer | operator-> () const |
Dereference operator. | |
virtual pointer | operator() () const |
use like this: | |
virtual bool | operator== (const _Self &rhs) |
Equality operator. | |
virtual bool | operator!= (const _Self &rhs) |
Inequality operator. | |
virtual _Self | operator++ (int) |
Postfix proceed operator. | |
virtual _Self & | operator++ () |
Prefix proceed operator. | |
const bool & | isEnd () const |
virtual void | setStart (_Node *start) |
Set start node for next iteration. | |
Protected Methods | |
void | setEnd (bool end=true) |
void | addToNodeList (const std::list< _NonConstNode * > *values) |
Add Nodes from a NodeList to the list, if they aren't already visited. | |
Protected Attributes | |
_Node * | m_currentNode |
_Node * | m_root |
std::list< _Node * > | m_nodeList |
std::set< _Node * > | m_seenNodeSet |
That means, it visits first a root node and then its children. It doesn't iterate over subtree nodes. The default constructor makes a 'past the end NodeIterator'. It is the base class of all iterators and inherits from forward_iterator. Template-parameter _TContent: see Node class.
Definition at line 62 of file nodeiterator.h.
|
Reimplemented in PostOrderNodeIterator. Definition at line 65 of file nodeiterator.h. |
|
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 69 of file nodeiterator.h. Referenced by NodeIterator::clone(), and NodeIterator< Node< value_type > >::construct(). |
|
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 68 of file nodeiterator.h. |
|
Definition at line 77 of file nodeiterator.h. |
|
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 67 of file nodeiterator.h. |
|
Definition at line 72 of file nodeiterator.h. |
|
Definition at line 74 of file nodeiterator.h. Referenced by NodeIterator< Node< value_type > >::operator()(), and NodeIterator< Node< value_type > >::operator->(). |
|
Definition at line 75 of file nodeiterator.h. Referenced by NodeIterator< Node< value_type > >::operator *(). |
|
Definition at line 76 of file nodeiterator.h. |
|
Definition at line 73 of file nodeiterator.h. |
|
The default constructor makes a 'past the end NodeIterator'.
Definition at line 80 of file nodeiterator.h. |
|
Construct a NodeIterator beginning at the given Node.
Definition at line 86 of file nodeiterator.h. |
|
Definition at line 89 of file nodeiterator.h. |
|
Add Nodes from a NodeList to the list, if they aren't already visited.
Definition at line 369 of file nodeiterator.h. References NodeIterator::m_nodeList, and NodeIterator::m_seenNodeSet. Referenced by AllNodeIterator::operator++(), LeaveIterator::operator++(), VariableNodeIterator::operator++(), and NodeIterator::operator++(). |
|
Copy constructor.
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 275 of file nodeiterator.h. References NodeIterator::_Self. |
|
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 87 of file nodeiterator.h. |
|
Definition at line 101 of file nodeiterator.h. Referenced by AllNodeIterator::operator!=(), LeaveIterator::operator!=(), VariableNodeIterator::operator!=(), PostOrderNodeIterator::operator!=(), NodeIterator::operator!=(), AllNodeIterator::operator==(), LeaveIterator::operator==(), VariableNodeIterator::operator==(), PostOrderNodeIterator::operator==(), and NodeIterator::operator==(). |
|
Dereference operator.
Definition at line 92 of file nodeiterator.h. |
|
Inequality operator.
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 319 of file nodeiterator.h. References NodeIterator::isEnd(). |
|
use like this:
|
|
Prefix proceed operator.
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 329 of file nodeiterator.h. References NodeIterator::addToNodeList(), NodeIterator::m_currentNode, NodeIterator::m_nodeList, NodeIterator::m_root, and NodeIterator::setEnd(). Referenced by NodeIterator::operator++(). |
|
Postfix proceed operator.
Definition at line 352 of file nodeiterator.h. References NodeIterator::operator++(). |
|
Dereference operator.
Definition at line 94 of file nodeiterator.h. |
|
Equality operator.
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, LeaveIterator, and AllNodeIterator. Definition at line 308 of file nodeiterator.h. References NodeIterator::isEnd(). |
|
Definition at line 111 of file nodeiterator.h. Referenced by AllNodeIterator::operator++(), LeaveIterator::operator++(), VariableNodeIterator::operator++(), PostOrderNodeIterator::operator++(), and NodeIterator::operator++(). |
|
Set start node for next iteration.
Reimplemented in PostOrderNodeIterator, VariableNodeIterator, and LeaveIterator. Definition at line 289 of file nodeiterator.h. References NodeIterator::m_currentNode, NodeIterator::m_nodeList, NodeIterator::m_root, and NodeIterator::m_seenNodeSet. Referenced by AllNodeIterator::AllNodeIterator(), and NodeIterator< Node< value_type > >::NodeIterator(). |
|
|
Definition at line 108 of file nodeiterator.h. Referenced by NodeIterator::addToNodeList(), AllNodeIterator::operator++(), LeaveIterator::operator++(), VariableNodeIterator::operator++(), NodeIterator::operator++(), and NodeIterator::setStart(). |
|
Definition at line 107 of file nodeiterator.h. Referenced by NodeIterator< Node< value_type > >::NodeIterator(), VariableNodeIterator::operator++(), PostOrderNodeIterator::operator++(), NodeIterator::operator++(), and NodeIterator::setStart(). |
|
Definition at line 109 of file nodeiterator.h. Referenced by NodeIterator::addToNodeList(), and NodeIterator::setStart(). |