1
/******************************************************************************
2
* swcom.h - code for base class 'SWCom'. SWCom is the basis for all
3
* types of commentary modules.
4
* It is traditionally close to the same as the SWText
5
* module type, but has defaults set which more
6
* closely represent how a commentary will be used and how
7
* the bulk of our commentaries expect to be used. For example,
8
* most commentaries consist of entries for a range of text
9
* (Matt.1.1-6: "Matthew begins with by telling us..."). This
10
* same entry will be returned when any verse between Matt.1.1-6
11
* is requested from the engine. This is done with verse linking.
12
* Since linking is used heavily in commentaries, the flag
13
* skipConsecutiveLinks is defaulted to true so when the
14
* commentary is incremented, it will go to the next ENTRY,
15
* not the next verse (likely Matt.1.7, from our example above).
17
* $Id: swcom.h 2362 2009-04-29 07:21:35Z scribe $
19
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
20
* CrossWire Bible Society
22
* Tempe, AZ 85280-2528
24
* This program is free software; you can redistribute it and/or modify it
25
* under the terms of the GNU General Public License as published by the
26
* Free Software Foundation version 2.
28
* This program is distributed in the hope that it will be useful, but
29
* WITHOUT ANY WARRANTY; without even the implied warranty of
30
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31
* General Public License for more details.
47
/** The basis for all commentary modules
49
class SWDLLEXPORT SWCom : public SWModule {
51
mutable VerseKey *tmpVK1;
52
mutable VerseKey *tmpVK2;
53
mutable bool tmpSecond;
57
VerseKey &getVerseKey(const SWKey *key = 0) const;
62
/** Initializes data for instance of SWCom
64
SWCom(const char *imodname = 0, const char *imoddesc = 0,
65
SWDisplay *idisp = 0, SWTextEncoding enc = ENC_UNKNOWN,
66
SWTextDirection dir = DIRECTION_LTR,
67
SWTextMarkup mark = FMT_UNKNOWN, const char *ilang = 0,
68
const char *versification = "KJV");
71
virtual SWKey *CreateKey() const;
73
virtual long Index() const;
74
virtual long Index(long iindex);
78
// OPERATORS -----------------------------------------------------------------