![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HashMap< Key, T, Hash > Class Template Reference#include <HashMap.h>
Inheritance diagram for HashMap< Key, T, Hash >: ![]() Detailed Descriptiontemplate<typename Key, typename T, typename Hash>
|
Public Member Functions | |
HashMap (const int maxBuckets) | |
T & | operator[] (Key &key) |
map< Key, T >::const_iterator | findItem (const Key &key) |
void | insert (const Key &key, const T &item) |
int | erase (const Key &k) |
Public Attributes | |
Hash | hash |
|
Constructor
Definition at line 18 of file HashMap.cpp. References HashMap< Key, T, Hash >::hash. |
|
Overloads the subscript operator for the HashMap class
Definition at line 25 of file HashMap.cpp. References HashMap< Key, T, Hash >::hash. |
|
Hashes the key to find the vector index. Finds the map element using the key as the index.
Definition at line 31 of file HashMap.cpp. References HashMap< Key, T, Hash >::hash. |
|
Hashes the key to find the vector index. Inserts the (key, item) pair into the map at that index.
Definition at line 41 of file HashMap.cpp. References HashMap< Key, T, Hash >::hash. |
|
Removes the item with the Key k in the hash table.
Definition at line 49 of file HashMap.cpp. References HashMap< Key, T, Hash >::hash. |
|
The hash function object. Definition at line 62 of file HashMap.h. Referenced by HashMap< Key, T, Hash >::erase(), HashMap< Key, T, Hash >::findItem(), HashMap< Key, T, Hash >::HashMap(), HashMap< Key, T, Hash >::insert(), and HashMap< Key, T, Hash >::operator[](). |