template class axl::sl::HashTable
#include <axl_sl_HashTable.h> template < typename Key, typename Value, typename Hash, typename Eq = Eq<Key>, typename KeyArg = typename ArgType<Key>::Type, typename ValueArg = typename ArgType<Value>::Type > class HashTable { public: // typedefs typedef HashTableEntry<Key, Value> Entry; typedef sl::Iterator<Entry> Iterator; typedef sl::ConstIterator<Entry> ConstIterator; typedef Entry::Bucket Bucket; // enums enum Def; // construction HashTable( const Hash& hash = Hash(), const Eq& eq = Eq() ); // methods Value& operator[](KeyArg key); void clear(); bool isEmpty() const; Iterator getHead(); ConstIterator getHead() const; Iterator getTail(); ConstIterator getTail() const; size_t getCount() const; size_t getBucketCount() const; bool setBucketCount(size_t bucketCount); size_t getResizeThreshold() const; void setResizeThreshold(size_t resizeThreshold); Iterator find(KeyArg key); ConstIterator find(KeyArg key) const; Value findValue( KeyArg key, ValueArg undefinedValue ) const; Iterator visit(KeyArg key); Iterator add( KeyArg key, ValueArg value, bool* isNew = NULL ); Iterator addIfNotExists( KeyArg key, ValueArg value ); void erase(Iterator it); bool eraseKey(KeyArg key); bool sortByKey(); template <typename Compare> bool sortByKey(Compare compare); bool sortByValue(); template <typename Compare> bool sortByValue(Compare compare); };