Tree::PreorderIterator Class Reference

#include <tree.h>

Inheritance diagram for Tree::PreorderIterator:

Tree::Iterator List of all members.

Detailed Description

template<class T>
class libpmk::Tree< T >::PreorderIterator

Preorder depth-first iterator for Trees.


Public Member Functions

 PreorderIterator (int node_id, const Tree< T > *tree)
 Creates a new iterator rooted at <node_id>. The resulting traversal will ignore any parents of <node_id>.
virtual ~PreorderIterator ()
virtual Iteratoroperator++ ()
bool operator== (const Iterator &other)
 Returns true iff <other> points to the same node.
bool operator!= (const Iterator &other)
 Returns true iff <other> points to a different node.
int operator * ()
int id ()

Protected Attributes

int node_id_
const Tree< T > * source_tree_


Constructor & Destructor Documentation

PreorderIterator ( int  node_id,
const Tree< T > *  tree 
) [inline]

Creates a new iterator rooted at <node_id>. The resulting traversal will ignore any parents of <node_id>.

virtual ~PreorderIterator (  )  [inline, virtual]


Member Function Documentation

Tree< T >::Iterator & operator++ (  )  [virtual]

Implements Tree::Iterator.

bool operator== ( const Iterator other  )  [inline, inherited]

Returns true iff <other> points to the same node.

bool operator!= ( const Iterator other  )  [inline, inherited]

Returns true iff <other> points to a different node.

int operator * (  )  [inline, inherited]

int id (  )  [inline, inherited]


Member Data Documentation

int node_id_ [protected, inherited]

const Tree<T>* source_tree_ [protected, inherited]


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 11:39:06 2007 for libpmk2 by  doxygen 1.5.1