Tree::AVL::Iterator< T, KeyType, DeleterT > Class Template Reference

#include <Avl.hpp>

List of all members.


Detailed Description

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
class Tree::AVL::Iterator< T, KeyType, DeleterT >

This iterator is a facility to avoid recursive algorithm.


Public Types

typedef Node< T, KeyType,
DeleterT > 
NodeT

Public Member Functions

const KeyType * getKey () const
 Return the node key.
Iterator getLeftIterator () const
 Get left iterator.
Iterator getParentIterator () const
 Get parent iterator.
Iterator getRightIterator () const
 Get right iterator.
bool isTerminal () const
 Check if this iterator node is a final node.
bool isValid () const
 Check validity for this iterator.
 Iterator (const Iterator &iter)
 Copy constructor.
 Iterator (NodeT *_node=NULL)
 Constructor.
void Mutate (const T &newData)
 Change the pointed object.
const T & operator * () const
 Access the pointed object.
T & operator * ()
 Access the pointed object.
bool operator!= (const Iterator &rhs) const
 Inverted compare.
Iterator operator++ (int) const
 Move to the next node before the actual advance.
Iteratoroperator++ () const
 Move to the next node.
Iteratoroperator= (const Iterator &iter) const
 Copy the iterator.
bool operator== (const Iterator &rhs) const
 Basic iterator compare.

Public Attributes

NodeTnode
 The current node pointer.


Member Typedef Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
typedef Node<T, KeyType, DeleterT> Tree::AVL::Iterator< T, KeyType, DeleterT >::NodeT


Constructor & Destructor Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Tree::AVL::Iterator< T, KeyType, DeleterT >::Iterator ( NodeT _node = NULL  )  [inline]

Constructor.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Tree::AVL::Iterator< T, KeyType, DeleterT >::Iterator ( const Iterator< T, KeyType, DeleterT > &  iter  )  [inline]

Copy constructor.


Member Function Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
const KeyType* Tree::AVL::Iterator< T, KeyType, DeleterT >::getKey (  )  const [inline]

Return the node key.

Returns:
a pointer on the key for this node if valid, or 0 else

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Iterator Tree::AVL::Iterator< T, KeyType, DeleterT >::getLeftIterator (  )  const [inline]

Get left iterator.

Returns:
valid iterator if valid, ie to be checked with isValid()

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Iterator Tree::AVL::Iterator< T, KeyType, DeleterT >::getParentIterator (  )  const [inline]

Get parent iterator.

Returns:
valid iterator if valid, ie to be checked with isValid()

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Iterator Tree::AVL::Iterator< T, KeyType, DeleterT >::getRightIterator (  )  const [inline]

Get right iterator.

Returns:
valid iterator if valid, ie to be checked with isValid()

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
bool Tree::AVL::Iterator< T, KeyType, DeleterT >::isTerminal (  )  const [inline]

Check if this iterator node is a final node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
bool Tree::AVL::Iterator< T, KeyType, DeleterT >::isValid (  )  const [inline]

Check validity for this iterator.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
void Tree::AVL::Iterator< T, KeyType, DeleterT >::Mutate ( const T &  newData  )  [inline]

Change the pointed object.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
const T& Tree::AVL::Iterator< T, KeyType, DeleterT >::operator * (  )  const [inline]

Access the pointed object.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
T& Tree::AVL::Iterator< T, KeyType, DeleterT >::operator * (  )  [inline]

Access the pointed object.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
bool Tree::AVL::Iterator< T, KeyType, DeleterT >::operator!= ( const Iterator< T, KeyType, DeleterT > &  rhs  )  const [inline]

Inverted compare.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Iterator Tree::AVL::Iterator< T, KeyType, DeleterT >::operator++ ( int   )  const [inline]

Move to the next node before the actual advance.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Iterator& Tree::AVL::Iterator< T, KeyType, DeleterT >::operator++ (  )  const [inline]

Move to the next node.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
Iterator& Tree::AVL::Iterator< T, KeyType, DeleterT >::operator= ( const Iterator< T, KeyType, DeleterT > &  iter  )  const [inline]

Copy the iterator.

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
bool Tree::AVL::Iterator< T, KeyType, DeleterT >::operator== ( const Iterator< T, KeyType, DeleterT > &  rhs  )  const [inline]

Basic iterator compare.


Member Data Documentation

template<typename T, typename KeyType, typename DeleterT = NoDeletion<T, KeyType>>
NodeT* Tree::AVL::Iterator< T, KeyType, DeleterT >::node [mutable]

The current node pointer.


The documentation for this class was generated from the following file:

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is