#ifndef _BSPTREE_DICTIONARY_HPP_ #define _BSPTREE_DICTIONARY_HPP_ #include #include template class Dictionary { public: Dictionary(void); Dictionary(const Dictionary& someDictionary); virtual ~Dictionary(); bool containsKey(const TKey& key); bool insert(const TKey& key, const TValue& value); TValue operator[](const TKey& key); Block getValues(void)const; Block getKeys(void)const; private: template class ItemEntry { public: ItemEntry(void) { } ItemEntry(const TKey& key, const TValue& value) { mKey = key; mValue = value; } ItemEntry(const TKey& key) { mKey = key; } ~ItemEntry() { } int operator==(const ItemEntry& item)const { return mKey == item.getKey(); } int operator<(const ItemEntry& item)const { return mKey < item.getKey(); } int operator>(const ItemEntry& item)const { return mKey > item.getKey(); } const TKey& getKey(void)const { return (TKey&)mKey; } TValue& getValue(void) { return mValue; } private: TKey mKey; TValue mValue; }; BTree> data; }; #include #endif