Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / storage / vm_storage.h
1 /* $XConsortium: vm_storage.h /main/4 1996/07/18 16:35:41 drk $ */
2
3 #ifndef _vm_storage_h
4 #define _vm_storage_h 1
5
6 #include "dstr/void_ptr_array.h"
7 #include "storage/abs_storage.h"
8
9 class vm_storage : public abs_storage
10 {
11 protected:
12    void_ptr_array f_array;
13
14 public:
15    vm_storage(char* path, char* name, rep_policy* rep_p = 0);
16    ~vm_storage() ;
17
18    void remove();
19
20    // i/o functions
21    int readString (mmdb_pos_t loc, char* base, int len, 
22                   int str_offset = 0) ;
23    int insertString(mmdb_pos_t& loc, const char* base, int len, Boolean flush = false) ;
24    int get_str_ptr(mmdb_pos_t loc, char*&, int& len);
25
26    int updateString(mmdb_pos_t loc, const char* base, int len, 
27                     int string_ofst = 0, Boolean flush = false) ;
28    int deleteString (mmdb_pos_t loc, Boolean flush = false) ;
29    int allocString (mmdb_pos_t& loc, int len, char*&, int mode = 0);
30
31    int appendString(mmdb_pos_t loc, const char*, int len,
32                             Boolean flush_opt = false) ;
33
34 // status functions
35    Boolean io_mode(int mode) ;
36
37    friend class storage_mgr_t;
38
39 protected:
40 };
41
42 #endif