-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashtable.h
More file actions
35 lines (29 loc) · 747 Bytes
/
hashtable.h
File metadata and controls
35 lines (29 loc) · 747 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
#ifndef PMHASHTABLE_HASHTABLE_H
#define PMHASHTABLE_HASHTABLE_H
#include "dataindex.h"
#include "datapool.h"
#include "options.h"
#include <string>
#include <stdint.h>
#include <iostream>
#include <fstream>
#include <assert.h>
namespace pmhashtable {
class HashTable {
public:
explicit HashTable(Options& opt);
~HashTable();
bool Write(const std::string key, const std::string value);
bool Read(const std::string key, std::string* value);
bool Delete(const std::string key);
bool Scan(const std::string key, const int n);
std::string Key();
std::string Value();
bool Valid();
void Next();
private:
DataPool datapool_;
DataIndex dataindex_;
};
} // pmhashtable
#endif // PMHASHTABLE_HASHTABLE_H