00001
00002
00003
00004 #ifndef __ORESDB_H
00005 #define __ORESDB_H
00006
00007 #ifndef __ALL_H
00008 #include <ALL.H>
00009 #endif
00010
00011
00012
00013 class Database;
00014
00018 class ResourceDb : public File {
00019 public:
00020 char init_flag;
00021
00022 private:
00023 Database *db_obj;
00024 int index_field_offset;
00025 int use_common_buf;
00026 char *data_buf;
00027 int data_buf_size;
00028
00029 char read_all;
00030
00031 public:
00032 ResourceDb() { init_flag=0; }
00033 ~ResourceDb() { deinit(); }
00034
00035 ResourceDb(char* resName,Database* dbObj,int indexOffset,int useCommonBuf=0)
00036 { init_flag=0; init(resName,dbObj,indexOffset,useCommonBuf); }
00037
00038 void init(char*,Database*,int,int=0);
00039 void deinit();
00040
00041 char* read(int= -1);
00042 File* get_file();
00043
00044 void init_imported(char*,int,int=0);
00045 char* read_imported(long);
00046 };
00047 #endif