rawgenbook.h

00001 /******************************************************************************
00002  *  rawtext.h   - code for class 'RawText'- a module that reads raw text files:
00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
00004  *
00005  * $Id: rawgenbook.h 1917 2006-05-22 01:07:17Z scribe $
00006  *
00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00008  *      CrossWire Bible Society
00009  *      P. O. Box 2528
00010  *      Tempe, AZ  85280-2528
00011  *
00012  * This program is free software; you can redistribute it and/or modify it
00013  * under the terms of the GNU General Public License as published by the
00014  * Free Software Foundation version 2.
00015  *
00016  * This program is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * General Public License for more details.
00020  *
00021  */
00022 
00023 #ifndef RAWGENBOOK_H
00024 #define RAWGENBOOK_H
00025 
00026 #include <swgenbook.h>
00027 
00028 #include <defs.h>
00029 
00030 SWORD_NAMESPACE_START
00031 
00032 class FileDesc;
00033 
00034 class SWDLLEXPORT RawGenBook : public SWGenBook {
00035         char *path;
00036         FileDesc *bdtfd;
00037         bool verseKey;
00038 
00039 public:
00040   
00041     
00042         RawGenBook(const char *ipath, const char *iname = 0, const char *idesc = 0,
00043                         SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
00044                         SWTextDirection dir = DIRECTION_LTR,
00045                         SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, const char *keyType = "TreeKey");
00046         virtual ~RawGenBook();
00047         virtual SWBuf &getRawEntryBuf();
00048         // write interface ----------------------------
00049         virtual bool isWritable();
00050         static char createModule(const char *ipath);
00051         virtual void setEntry(const char *inbuf, long len = -1);        // Modify current module entry
00052         virtual void linkEntry(const SWKey * linkKey);  // Link current module entry to other module entry
00053         virtual void deleteEntry();     // Delete current module entry
00054         virtual SWKey *CreateKey();
00055         // end write interface ------------------------
00056 
00057 
00058         // OPERATORS -----------------------------------------------------------------
00059         
00060         SWMODULE_OPERATORS
00061 
00062 };
00063 
00064 SWORD_NAMESPACE_END
00065 #endif