simpleHashTable.h
Go to the documentation of this file.
00001 /* simpleHashTable.h
00002  */
00003 #ifndef OSL_SIMPLE_HASHTABLE_H
00004 #define OSL_SIMPLE_HASHTABLE_H
00005 
00006 #include "osl/container/generalSimpleHashTable.h"
00007 #include "osl/container/moveVector.h"
00008 namespace osl
00009 {
00010   namespace search
00011   {
00012     class SimpleHashRecord;
00013 
00032     class SimpleHashTable : private container::GeneralSimpleHashTable<SimpleHashRecord>
00033     {
00034     private:
00035       int minimum_limit;
00036       int verbose;
00037     public:
00044       explicit SimpleHashTable(size_t capacity=100000, 
00045                                int minimum_record_limit=0,
00046                                int verbose=0);
00047       ~SimpleHashTable();
00048 
00049       using GeneralSimpleHashTable<SimpleHashRecord>::clear;
00054       void setMinimumRecordLimit(int new_limit);
00055 
00063       SimpleHashRecord *allocate(const HashKey& key, int limit);
00064 
00071       using GeneralSimpleHashTable<SimpleHashRecord>::find;
00072 
00073       int minimumRecordLimit() const;
00074       using GeneralSimpleHashTable<SimpleHashRecord>::size;
00075       using GeneralSimpleHashTable<SimpleHashRecord>::capacity;
00076 
00077       void setVerbose(int verbose=1);
00078       int verboseLevel() const;
00079       bool isVerbose() const { return verboseLevel(); }
00080 
00081       bool isConsistent() const;
00082       int divSize() const;
00083 
00084       void getPV(const HashKey&, MoveVector&, size_t *quiesce_start=0) const;
00085       uint64_t memoryUse() const;
00086     };
00087     
00088   } // namespace search
00089 
00090   using search::SimpleHashTable;
00091 } // namespace osl
00092 
00093 #endif /* OSL_SIMPLE_HASHTABLE_H_ */
00094 // ;;; Local Variables:
00095 // ;;; mode:c++
00096 // ;;; c-basic-offset:2
00097 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines