00001 /* simpleHashTable.h 00002 */ 00003 #ifndef _SIMPLE_HASHTABLE_H 00004 #define _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 struct 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 }; 00086 00087 } // namespace search 00088 00089 using search::SimpleHashTable; 00090 } // namespace osl 00091 00092 #endif /* _SIMPLE_HASHTABLE_H_ */ 00093 // ;;; Local Variables: 00094 // ;;; mode:c++ 00095 // ;;; c-basic-offset:2 00096 // ;;; End: