00001
00018 #include <vector>
00019 #include <map>
00020
00021 using namespace std;
00022
00023 template <typename Key, typename T, typename Hash>
00024 class HashMap : private vector<map<Key, T> >
00025 {
00026 public:
00027
00032 HashMap(const int maxBuckets);
00033
00037 T& operator[](Key& key);
00038
00045 map<Key, T>::const_iterator findItem(const Key& key);
00046
00052 void insert(const Key& key, const T& item);
00053
00059 int erase(const Key& k);
00060
00062 Hash hash;
00063 };
00064
00065 #include "HashMap.cpp"
00066