1
/******************************************************************************
2
* hrefcom.cpp - code for class 'HREFCom'- a module that produces HTML HREFs
3
* pointing to actual text desired. Uses standard
4
* files: ot and nt using indexs ??.bks ??.cps ??.vss
24
/******************************************************************************
25
* HREFCom Constructor - Initializes data for instance of HREFCom
27
* ENT: iname - Internal name for module
28
* iprefix - string to prepend to each HREF (e.g. "file://mods/com/jfb/")
29
* idesc - Name to display to user for module
30
* idisp - Display object to use for displaying
33
HREFCom::HREFCom(const char *ipath, const char *iprefix, const char *iname, const char *idesc, SWDisplay *idisp) : RawVerse(ipath), SWCom(iname, idesc, idisp)
36
stdstr(&prefix, iprefix);
40
/******************************************************************************
41
* HREFCom Destructor - Cleans up instance of HREFCom
51
/******************************************************************************
52
* HREFCom::operator char * - Returns the correct verse when char * cast
55
* RET: string buffer with verse
58
SWBuf &HREFCom::getRawEntryBuf() {
66
key = SWDYNAMIC_CAST(VerseKey, this->key);
72
key = new VerseKey(this->key);
74
findOffset(key->Testament(), key->Index(), &start, &size);
75
entrySize = size; // support getEntrySize call
79
readText(key->Testament(), start, size, tmpbuf);
81
entryBuf += tmpbuf.c_str();