Tree::Iterator Class Reference

#include <tree.h>

Inheritance diagram for Tree::Iterator:

Tree::BreadthFirstIterator Tree::PostorderIterator Tree::PreorderIterator List of all members.

Detailed Description

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

An iterator for Trees.


Public Member Functions

 Iterator (int node_id, const Tree< T > *source_tree)
 Creates a new iterator pointing at the given ID.
virtual ~Iterator ()
Iteratoroperator= (const Iterator &other)
 Copy assignment operator.
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 ()
virtual Iteratoroperator++ ()=0

Protected Attributes

int node_id_
const Tree< T > * source_tree_


Constructor & Destructor Documentation

Iterator ( int  node_id,
const Tree< T > *  source_tree 
) [inline]

Creates a new iterator pointing at the given ID.

virtual ~Iterator (  )  [inline, virtual]


Member Function Documentation

Iterator& operator= ( const Iterator other  )  [inline]

Copy assignment operator.

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

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

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

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

int operator * (  )  [inline]

int id (  )  [inline]

virtual Iterator& operator++ (  )  [pure virtual]

Implemented in Tree::PreorderIterator, Tree::PostorderIterator, and Tree::BreadthFirstIterator.


Member Data Documentation

int node_id_ [protected]

const Tree<T>* source_tree_ [protected]


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