All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
simpleHashTable.h
Go to the documentation of this file.
1 /* simpleHashTable.h
2  */
3 #ifndef OSL_SIMPLE_HASHTABLE_H
4 #define OSL_SIMPLE_HASHTABLE_H
5 
8 namespace osl
9 {
10  namespace search
11  {
12  class SimpleHashRecord;
13 
32  class SimpleHashTable : private container::GeneralSimpleHashTable<SimpleHashRecord>
33  {
34  private:
36  int verbose;
37  public:
44  explicit SimpleHashTable(size_t capacity=100000,
45  int minimum_record_limit=0,
46  int verbose=0);
48 
49  using GeneralSimpleHashTable<SimpleHashRecord>::clear;
54  void setMinimumRecordLimit(int new_limit);
55 
63  SimpleHashRecord *allocate(const HashKey& key, int limit);
64 
72 
73  int minimumRecordLimit() const;
74  using GeneralSimpleHashTable<SimpleHashRecord>::size;
75  using GeneralSimpleHashTable<SimpleHashRecord>::capacity;
76 
77  void setVerbose(int verbose=1);
78  int verboseLevel() const;
79  bool isVerbose() const { return verboseLevel(); }
80 
81  bool isConsistent() const;
82  int divSize() const;
83 
84  void getPV(const HashKey&, MoveVector&, size_t *quiesce_start=0) const;
85  uint64_t memoryUse() const;
86  };
87 
88  } // namespace search
89 
90  using search::SimpleHashTable;
91 } // namespace osl
92 
93 #endif /* OSL_SIMPLE_HASHTABLE_H_ */
94 // ;;; Local Variables:
95 // ;;; mode:c++
96 // ;;; c-basic-offset:2
97 // ;;; End: