Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::util::HashMap< K, V, HashType, SizeType >::Iterator Class Reference

A class that iterates over hash map elements. More...

#include <omHashMap.h>

Public Member Functions

 Iterator (HashMap &newHashMap)
 Create a new hash map iterator for the specified hash map. More...
 
void operator++ ()
 Increment the location of a hash map iterator by one element. More...
 
void operator++ (int)
 Increment the location of a hash map iterator by one element. More...
 
 operator Bool () const
 Test whether or not the current element is valid. More...
 
V & operator* () const
 Return the value of the key-value pair pointed to by the iterator. More...
 
V * operator-> () const
 Access the current iterator element value. More...
 
V & getValue () const
 Get the value of the key-value pair pointed to by the iterator. More...
 
K & getKey () const
 Get the key of the key-value pair pointed to by the iterator. More...
 
HashType getKeyHash () const
 Get the key hash of the key-value pair pointed to by the iterator. More...
 
void remove ()
 Remove the current element from the hash table. More...
 
void reset ()
 Reset the iterator to the beginning of the hash map. More...
 

Detailed Description

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
class om::util::HashMap< K, V, HashType, SizeType >::Iterator

A class that iterates over hash map elements.

Constructor & Destructor Documentation

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
om::util::HashMap< K, V, HashType, SizeType >::Iterator::Iterator ( HashMap newHashMap)
inline

Create a new hash map iterator for the specified hash map.

Member Function Documentation

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
void om::util::HashMap< K, V, HashType, SizeType >::Iterator::operator++ ( )
inline

Increment the location of a hash map iterator by one element.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
void om::util::HashMap< K, V, HashType, SizeType >::Iterator::operator++ ( int  )
inline

Increment the location of a hash map iterator by one element.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
om::util::HashMap< K, V, HashType, SizeType >::Iterator::operator Bool ( ) const
inline

Test whether or not the current element is valid.

This will return FALSE when the last element of the hash map has been iterated over.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
V& om::util::HashMap< K, V, HashType, SizeType >::Iterator::operator* ( ) const
inline

Return the value of the key-value pair pointed to by the iterator.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
V* om::util::HashMap< K, V, HashType, SizeType >::Iterator::operator-> ( ) const
inline

Access the current iterator element value.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
V& om::util::HashMap< K, V, HashType, SizeType >::Iterator::getValue ( ) const
inline

Get the value of the key-value pair pointed to by the iterator.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
K& om::util::HashMap< K, V, HashType, SizeType >::Iterator::getKey ( ) const
inline

Get the key of the key-value pair pointed to by the iterator.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
HashType om::util::HashMap< K, V, HashType, SizeType >::Iterator::getKeyHash ( ) const
inline

Get the key hash of the key-value pair pointed to by the iterator.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
void om::util::HashMap< K, V, HashType, SizeType >::Iterator::remove ( )
inline

Remove the current element from the hash table.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
void om::util::HashMap< K, V, HashType, SizeType >::Iterator::reset ( )
inline

Reset the iterator to the beginning of the hash map.


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