-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashtable.cc
More file actions
42 lines (30 loc) · 867 Bytes
/
hashtable.cc
File metadata and controls
42 lines (30 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "hashtable.h"
namespace pmhashtable {
HashTable::HashTable(Options &opt) : datapool_(opt),
dataindex_(opt, &datapool_) {}
HashTable::~HashTable() {}
bool HashTable::Write(const std::string key, const std::string value) {
return dataindex_.Write(key, value);
}
bool HashTable::Read(const std::string key, std::string *value) {
return dataindex_.Read(key, value);
}
bool HashTable::Delete(const std::string key) {
return dataindex_.Delete(key);
}
bool HashTable::Scan(const std::string key, const int n) {
return dataindex_.Scan(key, n);
}
std::string HashTable::Key() {
return dataindex_.Key();
}
std::string HashTable::Value() {
return dataindex_.Value();
}
bool HashTable::Valid() {
return dataindex_.Valid();
}
void HashTable::Next() {
dataindex_.Next();
}
} // pmhashtable