Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

zverse.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 ZVERSE_H
00009 #define ZVERSE_H
00010 
00011 #include <filemgr.h>
00012 #include <fcntl.h>
00013 #include <rawverse.h>
00014 #include <swcomprs.h>
00015 
00016 #include <defs.h>
00017 
00018 class SWDLLEXPORT zVerse /*: public RawVerse */
00019 {
00020   SWCompress *compressor;
00021 
00022 protected:
00023   static int instance;          // number of instantiated RawVerse objects or derivitives
00024 
00025   FileDesc *idxfp[2];
00026   FileDesc *textfp[2];
00027   FileDesc *compfp[2];
00028   char *path;
00029   void preptext (char *buf);
00030   void settext (char testmt, long idxoff, const char *buf);
00031   void linkentry (char testmt, long destidxoff, long srcidxoff);
00032   void flushCache ();
00033   //RawVerse();
00034   char *cacheBuf;
00035   char cacheTestament;
00036   long cacheBufIdx;
00037   bool dirtyCache;
00038 
00039 public:
00040 
00041 #define VERSEBLOCKS 2
00042 #define CHAPTERBLOCKS 3
00043 #define BOOKBLOCKS 4
00044 
00045   static const char uniqueIndexID[];
00046   char nl;
00047   
00048     
00049     zVerse (const char *ipath, int fileMode = O_RDONLY, int blockType =
00050             CHAPTERBLOCKS, SWCompress * icomp = 0);
00051     virtual ~ zVerse ();
00052   void findoffset (char testmt, long idxoff, long *start,
00053                    unsigned short *end);
00054   void swgettext (char testmt, long start, unsigned short size, char *buf);
00055   //static char CreateModule(char *path);
00056   static char createModule (const char *path, int blockBound);
00057 };
00058 
00059 
00060 #endif

Generated at Thu May 24 19:50:27 2001 for The Sword Project by doxygen1.1.5 written by Dimitri van Heesch, © 1997-2000