00001 #ifndef INT_HASH_CLASS
00002 #define INT_HASH_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "hash_table.h"
00019
00021
00028 template <class contents>
00029 class int_hash : public hash_table<int, contents>
00030 {
00031 public:
00032 int_hash(int max_bits);
00033 ~int_hash();
00034
00035 const int_set &ids() const;
00036 void ids(int_set &ids) const;
00038
00039 outcome add(int key, contents *to_store);
00041 contents *acquire(int key);
00043 bool zap(int key);
00045 void reset();
00047
00048 typedef bool apply_function(const int &key, contents ¤t,
00049 void *data_link);
00050
00051 void apply(apply_function *to_apply, void *data_link);
00053
00054 private:
00055 int_set *_ids;
00057
00059 };
00060
00061 #endif
00062