Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

PostOrderNodeIterator Class Template Reference
[NodeIterator]

This iterator iterates over all nodes in post order that belong to a given node (have the same root) and are not fixed. More...

#include <nodeiterator.h>

Inheritance diagram for PostOrderNodeIterator:

Inheritance graph
[legend]
Collaboration diagram for PostOrderNodeIterator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef PostOrderNodeIterator<
_Node > 
iterator
typedef PostOrderNodeIterator<
const _Node > 
const_iterator
typedef PostOrderNodeIterator<
_Node, _Ref, _Ptr > 
_Self
typedef NodeIterator< _Node,
_Ref, _Ptr > 
_Base
typedef NodeTraits< _Node
>::_NonConstNode 
_NonConstNode

Public Methods

 PostOrderNodeIterator ()
 PostOrderNodeIterator (_Node *start)
 Construct a PostOrderNodeIterator beginning at the given Node.

virtual _Selfconstruct () const
virtual _Selfclone (_Node *start=0) const
 Copy constructor.

virtual ~PostOrderNodeIterator ()
virtual bool operator== (const _Self &rhs)
 Equality operator.

virtual bool operator!= (const _Self &rhs)
 Inequality operator.

virtual _Selfoperator++ ()
 Prefix proceed operator.

virtual void setStart (_Node *start)
 Set start node for next iteration.


Detailed Description

template<class _Node, class _Ref = _Node&, class _Ptr = _Node*>
class treecomp::PostOrderNodeIterator< _Node, _Ref, _Ptr >

This iterator iterates over all nodes in post order that belong to a given node (have the same root) and are not fixed.

It doesn't iterate over subtree nodes.
The default constructor makes a 'past the end VariableNodeIterator'.
Note:
For pre and postorder iterators the corresponding traversal classes are more specialised and efficient.

Definition at line 133 of file nodeiterator.h.


Member Typedef Documentation

typedef NodeIterator<_Node,_Ref,_Ptr> _Base
 

Definition at line 139 of file nodeiterator.h.

typedef NodeTraits<_Node>::_NonConstNode _NonConstNode
 

Reimplemented from NodeIterator.

Definition at line 140 of file nodeiterator.h.

typedef PostOrderNodeIterator<_Node, _Ref,_Ptr> _Self
 

Reimplemented from NodeIterator.

Definition at line 138 of file nodeiterator.h.

Referenced by PostOrderNodeIterator::clone(), and PostOrderNodeIterator::construct().

typedef PostOrderNodeIterator<const _Node > const_iterator
 

Reimplemented from NodeIterator.

Definition at line 137 of file nodeiterator.h.

typedef PostOrderNodeIterator<_Node> iterator
 

Reimplemented from NodeIterator.

Definition at line 136 of file nodeiterator.h.


Constructor & Destructor Documentation

PostOrderNodeIterator   [inline]
 

Definition at line 142 of file nodeiterator.h.

PostOrderNodeIterator _Node *    start [inline]
 

Construct a PostOrderNodeIterator beginning at the given Node.

Parameters:
start  The Node to start at

Definition at line 145 of file nodeiterator.h.

References PostOrderNodeIterator::setStart().

virtual ~PostOrderNodeIterator   [inline, virtual]
 

Definition at line 148 of file nodeiterator.h.


Member Function Documentation

PostOrderNodeIterator< _Node, _Ref, _Ptr >::_Self * clone _Node *    start = 0 const [virtual]
 

Copy constructor.

Parameters:
start  Node to start with (if not given make identical copy)

Reimplemented from NodeIterator.

Definition at line 397 of file nodeiterator.h.

References PostOrderNodeIterator::_Self.

virtual _Self* construct   const [inline, virtual]
 

Reimplemented from NodeIterator.

Definition at line 146 of file nodeiterator.h.

References PostOrderNodeIterator::_Self.

bool operator!= const _Self   rhs [virtual]
 

Inequality operator.

Warning:
Compares only 'past the end'

Reimplemented from NodeIterator.

Definition at line 422 of file nodeiterator.h.

References NodeIterator::isEnd().

PostOrderNodeIterator< _Node, _Ref, _Ptr >::_Self & operator++   [virtual]
 

Prefix proceed operator.

Reimplemented from NodeIterator.

Definition at line 446 of file nodeiterator.h.

References NodeIterator::m_currentNode, NodeIterator::m_root, and NodeIterator::setEnd().

bool operator== const _Self   rhs [virtual]
 

Equality operator.

Warning:
Compares only 'past the end'

Reimplemented from NodeIterator.

Definition at line 411 of file nodeiterator.h.

References NodeIterator::isEnd().

void setStart _Node *    start [virtual]
 

Set start node for next iteration.

Parameters:
start  The Node to start at

Reimplemented from NodeIterator.

Definition at line 430 of file nodeiterator.h.

References NodeIterator::m_currentNode.

Referenced by PostOrderNodeIterator::PostOrderNodeIterator().


The documentation for this class was generated from the following file:
Generated on Mon Jan 6 12:02:28 2003 for TreeComp by doxygen1.2.17