Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Hashtable< KEY, VALUE, SIZ >::HashIterator< it > Class Template Reference

#include <hashtable.h>

Collaboration diagram for Hashtable< KEY, VALUE, SIZ >::HashIterator< it >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef it it_type

Public Methods

bool operator== (const HashIterator &o) const
bool operator!= (const HashIterator &o) const
bool operator== (const it &o) const
bool operator!= (const it &o) const
it end ()
it begin ()
unsigned int size ()
value_typeoperator * ()
const value_typeoperator * () const
value_typeoperator-> ()
const value_typeoperator-> () const
 HashIterator (const KEY &key, vector_type *v)
 HashIterator (const KEY &key, vector_type *v, it i)
 operator it_type ()
 operator const it_type () const
HashIterator & operator++ ()
HashIterator operator++ (int)
HashIterator & operator+ (int inc) const

Private Methods

void findnext ()

Private Attributes

KEY key
vector_typev
it i

Friends

class Hashtable< KEY, VALUE, SIZ >

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
class Hashtable< KEY, VALUE, SIZ >::HashIterator< it >


Member Typedef Documentation

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
typedef it Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::it_type
 


Constructor & Destructor Documentation

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::HashIterator const KEY &    key,
vector_type   v
[inline]
 

00075 :key(key), v(v), i(v->begin()) {;findnext();}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::HashIterator const KEY &    key,
vector_type   v,
it    i
[inline]
 

00076 :key(key), v(v), i(i) {}


Member Function Documentation

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
it Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::begin   [inline]
 

00061 {return v->begin();}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
it Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::end   [inline]
 

00060 {return v->end();}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
void Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::findnext   [inline, private]
 

00046                         {
00047             const it e= v->end();
00048             for (;i!=e;++i) {
00049                 if (key==(*i).first)
00050                     break;
00051             }
00052         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
const value_type& Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator *   const [inline]
 

00066                                               {
00067             return *i;
00068         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
value_type& Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator *   [inline]
 

00063                                   {
00064             return *i;
00065         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator const it_type   const [inline]
 

00088                                        {
00089             return i;
00090         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator it_type   [inline]
 

00085                             {
00086             return i;
00087         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
bool Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator!= const it &    o const [inline]
 

00059 {return i!=o;}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
bool Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator!= const HashIterator< it > &    o const [inline]
 

00057 {return i!=o.i;}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
HashIterator& Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator+ int    inc const [inline]
 

00102                                                  {
00103             HashIterator<it> newit (this);
00104             for (int ii=0;ii<inc;++ii) {
00105                 newit++;
00106             }
00107             return newit;
00108         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
HashIterator Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator++ int    [inline]
 

00096                                       {
00097             HashIterator<it> oldthis (*this);
00098             i++;
00099             findnext();
00100             return oldthis;
00101         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
HashIterator& Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator++   [inline]
 

00091                                      {
00092             i++;
00093             findnext();
00094             return *this;
00095         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
const value_type& Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator->   const [inline]
 

00072                                               {
00073             return &(*i);
00074         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
value_type* Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator->   [inline]
 

00069                                   {
00070             return &(*i);
00071         }

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
bool Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator== const it &    o const [inline]
 

00058 {return i==o;}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
bool Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::operator== const HashIterator< it > &    o const [inline]
 

00056 {return i==o.i;}

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
unsigned int Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::size   [inline]
 

00062 {return v->size();}


Friends And Related Function Documentation

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
friend class Hashtable< KEY, VALUE, SIZ > [friend]
 


Member Data Documentation

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
it Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::i [private]
 

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
KEY Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::key [private]
 

template<class KEY, class VALUE, int SIZ = 256>
template<class it>
vector_type* Hashtable< KEY, VALUE, SIZ >::HashIterator< it >::v [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Jul 7 21:13:52 2003 for Ethereal by doxygen1.2.15