neo::core::HashTableIterator< Key, T, Cmp > Class Template Reference

#include <core/hashtable.h>

List of all members.


Detailed Description

template<class Key, class T, class Cmp>
class neo::core::HashTableIterator< Key, T, Cmp >

Sequential iterator for hash table

Author:
Mattias Jansson (mattias@realityrift.com)


Public Member Functions

 HashTableIterator (const HashTable< Key, T, Cmp > *p_table=0, int row=0, int idx=0)
 Construct iterator.
 HashTableIterator (const HashTableIterator &iter)
 Construct iterator copy.
T & operator * ()
 Dereference.
T * operator-> ()
 Dereference.
const T & operator * () const
 Dereference.
const T * operator-> () const
 Dereference.
HashTableIteratoroperator++ () const
 Advance to next object.
HashTableIterator operator++ (int) const
 Advance to next object.
HashTableIteratoroperator-- () const
 Retract to previous object.
HashTableIterator operator-- (int) const
 Retract to previous object.
bool operator== (const HashTableIterator &rhs) const
 Compare iterators.
bool operator!= (const HashTableIterator &rhs) const
 Compare iterators.
HashTableIteratoroperator= (const HashTableIterator &rhs) const
 Assign iterator.
const Key & getKey () const
 Access key for object.
T * get ()
 Access pointer to object.
const T * get () const
 Access pointer to object.


Constructor & Destructor Documentation

template<class Key, class T, class Cmp>
neo::core::HashTableIterator< Key, T, Cmp >::HashTableIterator ( const HashTable< Key, T, Cmp > *  p_table = 0,
int  row = 0,
int  idx = 0 
) [inline]

Parameters:
p_table Hash table
row Bucket
idx Index in bucket

template<class Key, class T, class Cmp>
neo::core::HashTableIterator< Key, T, Cmp >::HashTableIterator ( const HashTableIterator< Key, T, Cmp > &  iter  )  [inline]

Parameters:
iter Iterator to copy


Member Function Documentation

template<class Key, class T, class Cmp>
T & neo::core::HashTableIterator< Key, T, Cmp >::operator * (  )  [inline]

Returns:
Object pointed to

template<class Key, class T, class Cmp>
T * neo::core::HashTableIterator< Key, T, Cmp >::operator-> (  )  [inline]

Returns:
Pointer to object

template<class Key, class T, class Cmp>
const T & neo::core::HashTableIterator< Key, T, Cmp >::operator * (  )  const [inline]

Returns:
Object pointed to

template<class Key, class T, class Cmp>
const T * neo::core::HashTableIterator< Key, T, Cmp >::operator-> (  )  const [inline]

Returns:
Pointer to object

template<class Key, class T, class Cmp>
HashTableIterator< Key, T, Cmp > & neo::core::HashTableIterator< Key, T, Cmp >::operator++ (  )  const [inline]

Returns:
Self-reference

template<class Key, class T, class Cmp>
HashTableIterator< Key, T, Cmp > neo::core::HashTableIterator< Key, T, Cmp >::operator++ ( int   )  const [inline]

Returns:
Iterator pointing to object before advance

template<class Key, class T, class Cmp>
HashTableIterator< Key, T, Cmp > & neo::core::HashTableIterator< Key, T, Cmp >::operator-- (  )  const [inline]

Returns:
Self-reference

template<class Key, class T, class Cmp>
HashTableIterator< Key, T, Cmp > neo::core::HashTableIterator< Key, T, Cmp >::operator-- ( int   )  const [inline]

Returns:
Iterator pointing to object before retract

template<class Key, class T, class Cmp>
bool neo::core::HashTableIterator< Key, T, Cmp >::operator== ( const HashTableIterator< Key, T, Cmp > &  rhs  )  const [inline]

Parameters:
rhs Iterator
Returns:
true if iterators points to same object, false if not

template<class Key, class T, class Cmp>
bool neo::core::HashTableIterator< Key, T, Cmp >::operator!= ( const HashTableIterator< Key, T, Cmp > &  rhs  )  const [inline]

Parameters:
rhs Iterator
Returns:
false if iterators points to same object, true if not

template<class Key, class T, class Cmp>
HashTableIterator< Key, T, Cmp > & neo::core::HashTableIterator< Key, T, Cmp >::operator= ( const HashTableIterator< Key, T, Cmp > &  rhs  )  const [inline]

Parameters:
rhs Source iterator
Returns:
Self-reference

template<class Key, class T, class Cmp>
const Key & neo::core::HashTableIterator< Key, T, Cmp >::getKey (  )  const [inline]

Returns:
Key under which the pointed-to object is stored in the hash table

template<class Key, class T, class Cmp>
T * neo::core::HashTableIterator< Key, T, Cmp >::get (  )  [inline]

Returns:
Pointer to object, null if invalid iterator

template<class Key, class T, class Cmp>
const T * neo::core::HashTableIterator< Key, T, Cmp >::get (  )  const [inline]

Returns:
Pointer to object, null if invalid iterator


The documentation for this class was generated from the following file:
Generated on Sat Feb 17 20:51:02 2007 for NeoEngine 2 - Evolution by  doxygen 1.5.1