-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTableHashStore.hpp
30 lines (24 loc) · 911 Bytes
/
TableHashStore.hpp
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
#ifndef TABLEHASHSTORE_H
#define TABLEHASHSTORE_H
#include <string>
#include <stdexcept>
#include "HashStore.hpp"
using namespace std;
class TableHashStore : public HashStore {
protected:
public:
TableHashStore(const string &tablefile, const string &tmptablefile);
~TableHashStore();
void PutHashKeyValue(const struct ImgHash *pimghash, ClipTBLEntry *pentry, bool overwrite);
void GetHashValue(const struct ImgHash *pimghash, ClipTBLEntry **pentry);
void PutTmpHashKeyValue(const struct ImgHash *pimghash, TmpClipTBLEntry *pentry, bool overwrite);
void GetTmpHashValue(const struct ImgHash *pimghash, TmpClipTBLEntry **pentry);
void DeleteTmpHashValue(const struct ImgHash *pimghash);
int64_t GetCount();
void Shutdown();
};
class TableException : public runtime_error {
public:
TableException(const string &str):runtime_error(str){};
};
#endif // TABLEHASHSTORE_H