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

LeaveIterator Class Template Reference
[NodeIterator]

This iterator iterates over all leaves that belong to a given node (have the same root). More...

#include <nodeiterator.h>

Inheritance diagram for LeaveIterator:

Inheritance graph
[legend]
Collaboration diagram for LeaveIterator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef LeaveIterator< _Node > iterator
typedef LeaveIterator< const
_Node > 
const_iterator
typedef LeaveIterator< _Node,
_Ref, _Ptr > 
_Self
typedef NodeIterator< _Node,
_Ref, _Ptr > 
_Base

Public Methods

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

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

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

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

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

virtual _Selfoperator++ ()
 Prefix proceed operator.


Detailed Description

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

This iterator iterates over all leaves that belong to a given node (have the same root).

It doesn't iterate over subtree nodes. The default constructor makes a 'past the end LeaveIterator'.

Definition at line 205 of file nodeiterator.h.


Member Typedef Documentation

typedef NodeIterator<_Node,_Ref,_Ptr> _Base
 

Definition at line 211 of file nodeiterator.h.

typedef LeaveIterator<_Node, _Ref,_Ptr> _Self
 

Reimplemented from NodeIterator.

Definition at line 210 of file nodeiterator.h.

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

typedef LeaveIterator<const _Node > const_iterator
 

Reimplemented from NodeIterator.

Definition at line 209 of file nodeiterator.h.

typedef LeaveIterator<_Node> iterator
 

Reimplemented from NodeIterator.

Definition at line 208 of file nodeiterator.h.


Constructor & Destructor Documentation

LeaveIterator   [inline]
 

Definition at line 214 of file nodeiterator.h.

LeaveIterator _Node *    start [inline]
 

Construct a LeaveIterator beginning at the given Node.

Parameters:
start  The Node to start at

Definition at line 217 of file nodeiterator.h.

References LeaveIterator::setStart().

virtual ~LeaveIterator   [inline, virtual]
 

Definition at line 220 of file nodeiterator.h.


Member Function Documentation

LeaveIterator< _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 563 of file nodeiterator.h.

References LeaveIterator::_Self.

virtual _Self* construct   const [inline, virtual]
 

Reimplemented from NodeIterator.

Definition at line 218 of file nodeiterator.h.

References LeaveIterator::_Self.

bool operator!= const _Self   rhs [virtual]
 

Inequality operator.

Warning:
Compares only 'past the end'

Reimplemented from NodeIterator.

Definition at line 588 of file nodeiterator.h.

References NodeIterator::isEnd().

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

Prefix proceed operator.

Reimplemented from NodeIterator.

Definition at line 599 of file nodeiterator.h.

References NodeIterator::addToNodeList(), NodeIterator::m_currentNode, NodeIterator::m_nodeList, and NodeIterator::setEnd().

Referenced by LeaveIterator::setStart().

bool operator== const _Self   rhs [virtual]
 

Equality operator.

Warning:
Compares only 'past the end'

Reimplemented from NodeIterator.

Definition at line 577 of file nodeiterator.h.

References NodeIterator::isEnd().

virtual void setStart _Node *    start [inline, virtual]
 

Set start node for next iteration.

Parameters:
start  The Node to start at

Reimplemented from NodeIterator.

Definition at line 221 of file nodeiterator.h.

References LeaveIterator::operator++().

Referenced by LeaveIterator::LeaveIterator().


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