rawfiles.h

00001 /******************************************************************************
00002  *  rawfiles.h - code for class 'RawFiles'- a module that produces HTML HREFs
00003  *                      pointing to actual text desired.  Uses standard
00004  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
00005  *
00006  * $Id: rawfiles.h 1864 2005-11-20 06:06:40Z scribe $
00007  *
00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00009  *      CrossWire Bible Society
00010  *      P. O. Box 2528
00011  *      Tempe, AZ  85280-2528
00012  *
00013  * This program is free software; you can redistribute it and/or modify it
00014  * under the terms of the GNU General Public License as published by the
00015  * Free Software Foundation version 2.
00016  *
00017  * This program is distributed in the hope that it will be useful, but
00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * General Public License for more details.
00021  *
00022  */
00023 
00024 #ifndef RAWFILES_H
00025 #define RAWFILES_H
00026 
00027 #include <rawverse.h>
00028 #include <swcom.h>
00029 
00030 #include <defs.h>
00031 
00032 SWORD_NAMESPACE_START
00033 
00034 class SWDLLEXPORT RawFiles : public RawVerse, public SWCom {
00035 
00036         char *getNextFilename();
00037 
00038 public:
00039 
00040 
00041         RawFiles(const char *ipath, const char *iname = 0, const char *idesc = 0,
00042                         SWDisplay *idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
00043                         SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
00044                         const char *ilang = 0);
00045         virtual ~RawFiles();
00046         virtual SWBuf &getRawEntryBuf();
00047 
00048         // write interface ----------------------------
00052         virtual bool isWritable();
00053 
00058         static char createModule(const char *);
00059 
00064         virtual void setEntry(const char *inbuf, long len = -1);        // Modify current module entry
00065 
00070         virtual void linkEntry(const SWKey *linkKey);   // Link current module entry to other module entry
00071 
00075         virtual void deleteEntry();
00076         // end write interface ------------------------
00077 
00078 
00079         // OPERATORS -----------------------------------------------------------------
00080         
00081         SWMODULE_OPERATORS
00082 
00083 };
00084 
00085 SWORD_NAMESPACE_END
00086 #endif