source: tags/0.56/gdbm_pool.h @ 9

Last change on this file since 9 was 9, checked in by willem, 11 years ago

willem

File size: 768 bytes
Line 
1#ifndef GDBM_POOL_H
2#define GDBM_POOL_H
3#include <string>
4#include "gdbm.h"
5#include "stopos_key.h"
6#include "stopos_pool.h"
7#include "stopos.h"
8 
9class gdbm_pool : public stopos_pool
10{
11  private:
12    GDBM_FILE dbf;          // handle for access database
13    //static const int sync = GDBM_SYNC;
14    static const int sync = 0;
15
16    int get_record(std::string &r,const std::string &k);
17    int put_record(const std::string &r,const std::string &k);
18    int remove_record(const stopos_key &k);
19    int get_status(void);
20    int put_status(void);
21
22  public:
23    // constructor ()
24    gdbm_pool();
25
26    // destructor
27
28    ~gdbm_pool();
29
30
31    int create_db(void);
32    int purge_db(void);
33
34    int open_db(void);
35    int close_db(void);
36
37    void dump_db(void);
38
39};
40
41#endif
Note: See TracBrowser for help on using the repository browser.