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 (TreeNode *node)
 Creates a new iterator pointing at the given node.
virtual ~Iterator ()
Iteratoroperator= (const Iterator &other)
 Copy assignment operator.
bool operator== (const Iterator &other)
 Returns true iff <other> points to the same node in memory.
bool operator!= (const Iterator &other)
 Returns true iff <other> points to a different node in memory.
T * operator-> ()
 Accesses the pointer to the TreeNode.
T * get ()
 Returns a pointer to the TreeNode.
virtual Iteratoroperator++ ()=0

Protected Attributes

TreeNodenode_


Constructor & Destructor Documentation

Iterator ( TreeNode node  )  [inline]

Creates a new iterator pointing at the given node.

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 in memory.

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

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

T* operator-> (  )  [inline]

Accesses the pointer to the TreeNode.

T* get (  )  [inline]

Returns a pointer to the TreeNode.

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

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


Member Data Documentation

TreeNode* node_ [protected]


The documentation for this class was generated from the following file:
Generated on Wed May 2 11:17:13 2007 for libpmk by  doxygen 1.5.1