123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef __ORES_H
- #define __ORES_H
- #ifndef __OFILE_H
- #include <OFILE.h>
- #endif
- class Resource : public File
- {
- public:
- int rec_count;
- private:
- enum { DEF_BUF_SIZE = 5120 };
- long *index_buf;
- char *data_buf;
- unsigned data_buf_size;
- char init_flag;
- char read_all;
- char use_common_buf;
- int cur_rec_no;
- public:
- Resource() { init_flag=0; }
- ~Resource() { deinit(); }
- Resource(char* resFile, int readAll, int useCommonBuf=0)
- { init_flag=0; init(resFile, readAll, useCommonBuf); }
- void init(char* resFile, int readAll, int useCommonBuf=0);
- void deinit();
- int is_inited() { return init_flag; }
- char* read(int= -1);
- File* get_file(int, int&);
- };
- #endif
|