00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ZTEXT_H
00024 #define ZTEXT_H
00025
00026 #include <zverse.h>
00027 #include <swtext.h>
00028
00029
00030 #include <defs.h>
00031
00032
00033
00034
00035
00036 class SWDLLEXPORT zText:public zVerse, public SWText {
00037 VerseKey *lastWriteKey;
00038 bool sameBlock (VerseKey * lastWriteKey, VerseKey * key);
00039 int blockType;
00040 public:
00041
00042
00043 zText(const char *ipath, const char *iname = 0, const char *idesc =
00044 0, int blockType = CHAPTERBLOCKS, SWCompress * icomp =
00045 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
00046 const char* ilang = 0);
00047 virtual ~zText ();
00048 virtual char *getRawEntry();
00049
00050 virtual SWModule & operator += (int increment);
00051 virtual SWModule & operator -= (int decrement) { return this->operator += (-decrement); }
00052
00053
00054 virtual bool isWritable () { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
00055 static char createModule (const char *path, int blockBound) {
00056 return zVerse::createModule (path, blockBound);
00057 }
00058
00059 virtual SWModule & setentry (const char *inbuf, long len);
00060 virtual SWModule & operator << (const char *inbuf);
00061 virtual SWModule & operator << (const SWKey * linkKey);
00062 virtual void deleteEntry ();
00063
00064
00065
00066 virtual void flush() { flushCache(); }
00067
00068 };
00069
00070 #endif