THashMapIter Class Reference

#include <e32hashtab.h>

class THashMapIter : public THashTableIterBase

Inherits from

Detailed Description

A templated class which allows iteration over the elements of a RHashMap<K,V> class.

The array being iterated over may not be modified while an iteration is in progress or the iteration operations may malfunction or panic.

See also: RHashMap<K,V>

Constructor & Destructor Documentation

THashMapIter ( const RHashMap< K, V > & )

THashMapIter(const RHashMap< K, V > &aMap)[inline]

Construct an iterator over the specified associative array. The iterator starts at conceptual position one before the beginning of the list being iterated.

Parameters
aMapThe array to be iterated over.

Member Function Documentation

CurrentKey ( )

const K *CurrentKey()const [inline]

Return the key corresponding to the current position of the iterator.

Return Value
A pointer to the key object corresponding to the current position of the iterator. NULL if the iterator has just been constructed or reset, or if it has previously reached the end of an iteration.

CurrentValue ( )

V *CurrentValue()[inline]

Return the value corresponding to the current position of the iterator.

Return Value
A pointer to the value object corresponding to the current position of the iterator. NULL if the iterator has just been constructed or reset, or if it has previously reached the end of an iteration.

NextKey ( )

const K *NextKey()[inline]

Steps the iterator to the next position and returns the corresponding key.

Return Value
A pointer to the key object corresponding to the next position of the iterator. NULL if the iterator has exhausted all the available key-value pairs.

NextValue ( )

const V *NextValue()[inline]

Steps the iterator to the next position and returns the corresponding value.

Return Value
A pointer to the value object corresponding to the next position of the iterator. NULL if the iterator has exhausted all the available key-value pairs.

RemoveCurrent ( )

voidRemoveCurrent()[inline]

Reimplemented from THashTableIterBase::RemoveCurrent()

Removes the element at the current iterator position from the hash table. If the iterator does not currently point to a valid element, no action is taken. Note that the iterator position is not altered so it no longer points to a valid element following the Remove(). It is illegal to call either CurrentKey() or CurrentValue() on the iterator after calling Remove() - the only legal operations are Reset(), NextKey() or NextValue().

Reset ( )

voidReset()[inline]

Reimplemented from THashTableIterBase::Reset()

Reset the iterator to its initial state.