Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32hashtab.h

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class THashMapIter

class THashMapIter : public THashTableIterBase;

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.

Derivation

Members

Defined in THashMapIter:
CurrentKey(), CurrentValue(), NextKey(), NextValue(), RemoveCurrent(), Reset(), THashMapIter()


Construction and destruction


THashMapIter()

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

Description

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

Parameters

const RHashMap< K, V > &aMap

The array to be iterated over.

[Top]


Member functions


Reset()

inline void Reset();

Description

Reset the iterator to its initial state.


CurrentKey()

inline const K *CurrentKey() const;

Description

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

Return value

const K *

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.


NextKey()

inline const K *NextKey();

Description

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

Return value

const K *

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.


CurrentValue()

inline V *CurrentValue();

Description

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

Return value

V *

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.


NextValue()

inline const V *NextValue();

Description

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

Return value

const V *

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()

inline void RemoveCurrent();

Description

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().