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

A class that iterates over hash map elements but cannot modify the hash map. More...

#include <omHashMap.h>

Public Member Functions

 ConstBucketIterator (const HashMap &newHashMap, Index bucketIndex)
 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...
 
const V & operator* () const
 Return the value of the key-value pair pointed to by the iterator. More...
 
const V * operator-> () const
 Access the current iterator element value. More...
 
const V & getValue () const
 Get the value of the key-value pair pointed to by the iterator. More...
 
const 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 reset ()
 Reset the iterator to the beginning of the bucket. More...
 

Detailed Description

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

A class that iterates over hash map elements but cannot modify the hash map.

Constructor & Destructor Documentation

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
om::util::HashMap< K, V, HashType, SizeType >::ConstBucketIterator::ConstBucketIterator ( const HashMap newHashMap,
Index  bucketIndex 
)
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 >::ConstBucketIterator::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 >::ConstBucketIterator::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 >::ConstBucketIterator::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>
const V& om::util::HashMap< K, V, HashType, SizeType >::ConstBucketIterator::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>
const V* om::util::HashMap< K, V, HashType, SizeType >::ConstBucketIterator::operator-> ( ) const
inline

Access the current iterator element value.

template<typename K, typename V, typename HashType = Hash, typename SizeType = Size>
const V& om::util::HashMap< K, V, HashType, SizeType >::ConstBucketIterator::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>
const K& om::util::HashMap< K, V, HashType, SizeType >::ConstBucketIterator::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 >::ConstBucketIterator::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 >::ConstBucketIterator::reset ( )
inline

Reset the iterator to the beginning of the bucket.


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