source: tags/0.57/gdbm_pool.h @ 9

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

willem

File size: 779 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,const std::string &l);
17    int put_record(const std::string &r,const std::string &k,const std::string &l);
18    int remove_record(const stopos_key &k);
19
20  public:
21    // constructor ()
22    gdbm_pool();
23
24    // destructor
25
26    ~gdbm_pool();
27
28
29    int create_db(const std::string &dbname);
30    int purge_db(void);
31
32    int open_db(void);
33    int close_db(void);
34
35    void dump_db(void);
36
37};
38
39#endif
Note: See TracBrowser for help on using the repository browser.