Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

rawverse.h

00001 /******************************************************************************
00002  *  rawverse.h   - code for class 'RawVerse'- a module that reads raw text
00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
00004  *                      and provides lookup and parsing functions based on
00005  *                      class VerseKey
00006  */
00007 
00008 #ifndef RAWVERSE_H
00009 #define RAWVERSE_H
00010 
00011 #include <filemgr.h>
00012 #include <fcntl.h>
00013 
00014 #include <defs.h>
00015 #include <swbuf.h>
00016 
00017 SWORD_NAMESPACE_START
00018 
00019 class SWDLLEXPORT RawVerse {
00020         static int instance;            // number of instantiated RawVerse objects or derivitives
00021 protected:
00022         FileDesc *idxfp[2];
00023         FileDesc *textfp[2];
00024 
00025         char *path;
00026         void prepText(SWBuf &buf);
00027         void doSetText(char testmt, long idxoff, const char *buf, long len = -1);
00028         void doLinkEntry(char testmt, long destidxoff, long srcidxoff);
00029 
00030 public:
00031         static const char *nl;
00032         RawVerse(const char *ipath, int fileMode = -1);
00033         virtual ~RawVerse();
00034         void findOffset(char testmt, long idxoff, long *start,  unsigned short *end);
00035         void readText(char testmt, long start, unsigned short size, SWBuf &buf);
00036         static char createModule(const char *path);
00037 };
00038 
00039 SWORD_NAMESPACE_END
00040 #endif

Generated on Fri Feb 28 22:01:38 2003 for The Sword Project by doxygen1.3-rc3