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

rawstr.h

00001 /*****************************************************************************
00002  * rawstr.h   - code for class 'RawStr'- 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 StrKey
00006  *
00007  * $Id: rawstr_h-source.html,v 1.4 2001/10/05 20:45:21 mgruner Exp $
00008  *
00009  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00010  *      CrossWire Bible Society
00011  *      P. O. Box 2528
00012  *      Tempe, AZ  85280-2528
00013  *
00014  * This program is free software; you can redistribute it and/or modify it
00015  * under the terms of the GNU General Public License as published by the
00016  * Free Software Foundation version 2.
00017  *
00018  * This program is distributed in the hope that it will be useful, but
00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021  * General Public License for more details.
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;          // number of instantiated RawStr objects or derivitives
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

Generated at Fri Oct 5 22:45:32 2001 for The Sword Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001