Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

AbstractBinaryTree< T, Node >::Iterator Class Reference

Provides a nlog(n) iterator for AbstractBinaryTree. More...

#include <vdkbtrees.h>

List of all members.

Public Member Functions


Detailed Description

template<class T, class Node>
class AbstractBinaryTree< T, Node >::Iterator

Provides a nlog(n) iterator for AbstractBinaryTree.

Iterator is implementes as a member of AbstractBinaryTree rather than an external object.


Constructor & Destructor Documentation

template<class T, class Node>
AbstractBinaryTree< T, Node >::Iterator::Iterator (  AbstractBinaryTree< T, Node > &  _tree,
enum BtreeIteratorMode  start = BtMinKey
)  [inline]
 

ructor

Parameters:
tree tree reference
start where the iterator starts, can be:
  • BtMinKey from lowest key
  • BtRootKey from the tree root
  • BtMaxKey from the highest key

template<class T, class Node>
virtual AbstractBinaryTree< T, Node >::Iterator::~Iterator (   )  [inline, virtual]
 

Destructor


Member Function Documentation

template<class T, class Node>
virtual T AbstractBinaryTree< T, Node >::Iterator::current (   )  [inline, virtual]
 

Dereferencing operator returns the object of the node currently pointed to by the iterator.

template<class T, class Node>
virtual Node* AbstractBinaryTree< T, Node >::Iterator::current_node (   )  [inline, virtual]
 

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::find (  T &  x  )  [inline, virtual]
 

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::Next (   )  [inline, virtual]
 

Move iterator to next key

template<class T, class Node>
virtual T* AbstractBinaryTree< T, Node >::Iterator::Object (   )  [inline, virtual]
 

returns a pointer to the object of the node currently pointed to (as opposed to returning a copy of the node, as the dereferencing operator does).

template<class T, class Node>
virtual T AbstractBinaryTree< T, Node >::Iterator::operator * (   )  [inline, virtual]
 

Dereferencing operator returns the object of the node currently pointed to by the iterator.

template<class T, class Node>
virtual AbstractBinaryTree< T, Node >::Iterator::operator int (   )  [inline, virtual]
 

Returns o if iterator points a non valid node. ie: was moved behind the lowest/highest key

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::operator++ (  int   )  [inline, virtual]
 

Move iterator to next key

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::operator++ (   )  [inline, virtual]
 

Move iterator to next key

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::operator-- (  int   )  [inline, virtual]
 

Move iterator to prev key

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::operator-- (   )  [inline, virtual]
 

Move iterator to prev key

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::Parent (   )  [inline, virtual]
 

Move iterator to parent node

template<class T, class Node>
virtual void AbstractBinaryTree< T, Node >::Iterator::Previous (   )  [inline, virtual]
 

Move iterator to prev key

template<class T, class Node>
virtual T* AbstractBinaryTree< T, Node >::Iterator::RefObject (   )  [inline, virtual]
 

returns a pointer to the object of the node currently pointed to (as opposed to returning a copy of the node, as the dereferencing operator does).

template<class T, class Node>
void AbstractBinaryTree< T, Node >::Iterator::StartAt (  enum BtreeIteratorMode  start  )  [inline]
 

Starts iterator over at the minimum, maximum or root node of the binary tree.


The documentation for this class was generated from the following file:
Generated on Tue Aug 17 12:39:51 2004 for vdk 2.4.0 by doxygen 1.3.7