ULAPI  8.0
Public Member Functions | Friends | List of all members
ULHashTableIterator< K, V > Class Template Reference

A class used to iterate over the keys in a ULHashTable. Iteration is not in a readily predictable or sorted order, but it does visit each key exactly once. More...

#include <ulcontainers.h>

Public Member Functions

 ULHashTableIterator ()
 
 ULHashTableIterator (const ULHashTableIterator &it)
 
 ~ULHashTableIterator ()
 
const ULHashTableIteratoroperator= (const ULHashTableIterator &it)
 
const ULPair< K, V > & operator* () const
 
void operator++ ()
 
void operator++ (int)
 
 operator bool () const
 
bool isAtEnd () const
 
uluint32 getHashIndex () const
 

Friends

class ULHashTable< K, V >
 

Detailed Description

template<class K, class V>
class ULHashTableIterator< K, V >

A class used to iterate over the keys in a ULHashTable. Iteration is not in a readily predictable or sorted order, but it does visit each key exactly once.

Constructor & Destructor Documentation

template<class K , class V >
ULHashTableIterator< K, V >::ULHashTableIterator ( )

Default constructor.

template<class K , class V >
ULHashTableIterator< K, V >::ULHashTableIterator ( const ULHashTableIterator< K, V > &  it)

Copy constructor.

template<class K , class V >
ULHashTableIterator< K, V >::~ULHashTableIterator ( )

Destructor.

Member Function Documentation

template<class K , class V >
uluint32 ULHashTableIterator< K, V >::getHashIndex ( ) const
Returns
the hash value to which this iterator currently points.
template<class K , class V >
bool ULHashTableIterator< K, V >::isAtEnd ( ) const
Returns
true if this iterator points to the end of the sequence of (key, value) pairs in the the hash table. The "end" of this sequence is not a (key, value) pair–it's a spot just beyond the final pair in the sequence. Note that an iterator for which isAtEnd returns true must not be dereferenced using operator*.
template<class K , class V >
ULHashTableIterator< K, V >::operator bool ( ) const
Returns
true if this iterator does not point to the end of the sequence of (key, value) pairs in the hash table. A typical use of the boolean operator is to control a loop iterating over the whole hash table, like this: "for (iterator = table.begin(); iterator; ++iterator) {...}".
template<class K , class V >
const ULPair< K, V > & ULHashTableIterator< K, V >::operator* ( ) const

Dereference operator.

Returns
a const reference to the (key, value) pair pointed to by this iterator.
template<class K , class V >
void ULHashTableIterator< K, V >::operator++ ( )

Pre-increment operator. Advances this iterator to the next (key, value) pair in the hash table it points to. Note that neither this nor the post-increment operator returns a value.

template<class K , class V >
void ULHashTableIterator< K, V >::operator++ ( int  )

Post-increment operator. Advances this iterator to the next (key, value) pair in the hash table it points to. Note that neither this nor the pre-increment operator returns a value.

template<class K , class V >
const ULHashTableIterator< K, V > & ULHashTableIterator< K, V >::operator= ( const ULHashTableIterator< K, V > &  it)

Assignment operator.

Friends And Related Function Documentation

template<class K, class V>
friend class ULHashTable< K, V >
friend

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