Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef HASHMAP_H_
- #define HASHMAP_H_
- #include <unordered_map>
- #include <boost/variant/get.hpp>
- #include <boost/functional/hash.hpp>
- #include "LookupTable.h"
- using namespace std;
- namespace lookup {
- class HashMap: public lookup::LookupTable {
- public:
- HashMap(string table_name, string col_name) :
- lookup::LookupTable { table_name, col_name } {
- }
- virtual ~HashMap();
- void add_value(short agent_id, lut_value value);
- vector<short> lookup(lut_value value);
- int size();
- private:
- unordered_map<lut_value, short, boost::hash<lut_value>> table;
- };
- }
- #endif /* HASHMAP_H_ */
Advertisement
Add Comment
Please, Sign In to add comment