00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023
00024
00025 #ifndef RAWSTR_H
00026 #define RAWSTR_H
00027
00028 #include <filemgr.h>
00029
00030 #include <defs.h>
00031
00032 class SWDLLEXPORT RawStr
00033 {
00034 static int instance;
00035 FileDesc *idxfd;
00036 FileDesc *datfd;
00037 char *path;
00038 long lastoff;
00039
00040 protected:
00041 void preptext (char *buf);
00042 void settext (const char *key, const char *buf);
00043 void linkentry (const char *destkey, const char *srckey);
00044 public:
00045 char nl;
00046 RawStr (const char *ipath, int fileMode = -1);
00047 virtual ~ RawStr ();
00048 void getidxbuf (long ioffset, char **buf);
00049 void getidxbufdat (long ioffset, char **buf);
00050 char findoffset (const char *key, long *start, unsigned short *size,
00051 long away = 0, long *idxoff = 0);
00052 void gettext (long start, unsigned short size, char *idxbuf, char *buf);
00053 static char createModule (const char *path);
00054 };
00055
00056 #endif