00001 00037 #ifndef ABA_DICTIONARY_H 00038 #define ABA_DICTIONARY_H 00039 #include <iostream> 00040 using namespace std; 00041 00042 #include "abacus/global.h" 00043 #include "abacus/hash.h" 00044 00045 00046 template <class KeyType, class ItemType> 00047 class ABA_DICTIONARY : public ABA_ABACUSROOT { 00048 public: 00049 00055 ABA_DICTIONARYABA_GLOBAL *glob, int size); 00056 00065 friend ostream &operator<<(ostream &out, 00066 const ABA_DICTIONARY<KeyType, ItemType> &rhs); 00067 00073 void insert(const KeyType &key, const ItemType &item); 00074 00080 ItemType *lookUp(const KeyType &key); 00081 00082 private: 00083 00086 ABA_GLOBAL *glob_; 00087 00090 ABA_HASH<KeyType, ItemType> hash_; 00091 ABA_DICTIONARY(const ABA_DICTIONARY<KeyType, ItemType> &rhs); 00092 const ABA_DICTIONARY &operator=(const ABA_DICTIONARY<KeyType, ItemType> &rhs); 00093 }; 00094 00095 #include "abacus/dictionary.inc" 00096 00097 #endif // ABA_DICTIONARY_H 00098 00099