1
/******************************************************************************
2
* rawcom.h - code for class 'RawCom'- a module that reads raw commentary
3
* files: ot and nt using indexs ??.bks ??.cps ??.vss
5
* $Id: rawcom.h,v 1.18 2003/02/20 07:25:19 scribe Exp $
7
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
8
* CrossWire Bible Society
10
* Tempe, AZ 85280-2528
12
* This program is free software; you can redistribute it and/or modify it
13
* under the terms of the GNU General Public License as published by the
14
* Free Software Foundation version 2.
16
* This program is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* General Public License for more details.
33
class SWDLLEXPORT RawCom:public RawVerse, public SWCom {
35
VerseKey &getVerseKey();
40
RawCom(const char *ipath, const char *iname = 0, const char *idesc = 0,
41
SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
42
SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
43
const char* ilang = 0);
46
virtual SWBuf &getRawEntryBuf();
48
virtual void increment(int steps);
49
virtual void decrement(int steps) { increment(-steps); }
51
// write interface ----------------------------
52
virtual bool isWritable() {
53
return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR));
55
static char createModule(const char *path) { return RawVerse::createModule(path); }
56
virtual void setEntry(const char *inbuf, long len = -1); // Modify current module entry
57
virtual void linkEntry(const SWKey *linkKey); // Link current module entry to other module entry
58
virtual void deleteEntry(); // Delete current module entry
59
// end write interface ------------------------