The SWORD Project
1.9.0.svnversion
|
#include <versekey.h>
Classes | |
struct | VerseComponents |
Public Member Functions | |
virtual int | _compare (const VerseKey &ikey) |
SWDEPRECATED char | AutoNormalize (char iautonorm) |
SWDEPRECATED char | AutoNormalize () const |
SWDEPRECATED char | Book () const |
SWDEPRECATED char | Book (char ibook) |
SWDEPRECATED int | Chapter () const |
SWDEPRECATED int | Chapter (int ichapter) |
void | clearBounds () const |
SWDEPRECATED void | ClearBounds () |
virtual SWKey * | clone () const |
virtual int | compare (const SWKey &ikey) |
virtual void | copyFrom (const SWKey &ikey) |
virtual void | copyFrom (const VerseKey &ikey) |
virtual void | decrement (int steps=1) |
virtual bool | equals (const SWKey &ikey) |
SWDEPRECATED char | Error () |
virtual char | getBook () const |
virtual const char * | getBookAbbrev () const |
virtual int | getBookMax () const |
virtual const char * | getBookName () const |
virtual int | getChapter () const |
virtual int | getChapterMax () const |
const SWClass * | getClass () const |
virtual char | getError () const |
virtual long | getIndex () const |
char * | getLocale () const |
VerseKey & | getLowerBound () const |
virtual const char * | getOSISBookName () const |
virtual const char * | getOSISRef () const |
virtual const char * | getOSISRefRangeText () const |
virtual const char * | getRangeText () const |
virtual const char * | getShortRangeText () const |
virtual const char * | getShortText () const |
virtual char | getSuffix () const |
virtual char | getTestament () const |
virtual long | getTestamentIndex () const |
virtual int | getTestamentMax () const |
virtual const char * | getText () const |
VerseKey & | getUpperBound () const |
virtual int | getVerse () const |
virtual int | getVerseMax () const |
virtual const char * | getVersificationSystem () const |
SWDEPRECATED char | Headings (char iheadings=MAXPOS(char)) |
virtual void | increment (int steps=1) |
virtual bool | isAutoNormalize () const |
virtual bool | isBoundSet () const |
virtual bool | isIntros () const |
bool | isPersist () const |
virtual bool | isTraversable () const |
SWDEPRECATED VerseKey & | LowerBound (const VerseKey &lb) |
SWDEPRECATED VerseKey & | LowerBound () const |
virtual void | normalize (bool autocheck=false) |
SWDEPRECATED void | Normalize (char autocheck=0) |
virtual SWKEY_OPERATORS SWKey & | operator= (const VerseKey &ikey) |
virtual ListKey | parseVerseList (const char *buf, const char *defaultKey=0, bool expandRange=false, bool useChapterAsVerse=false) |
SWDEPRECATED ListKey | ParseVerseList (const char *buf, const char *defaultKey=0, bool expandRange=false, bool useChapterAsVerse=false) |
SWDEPRECATED char | Persist () const |
SWDEPRECATED char | Persist (signed char ipersist) |
virtual char | popError () |
virtual void | positionFrom (const SWKey &ikey) |
virtual void | setAutoNormalize (bool iautonorm) |
virtual void | setBook (char ibook) |
virtual void | setBookName (const char *bname) |
virtual void | setChapter (int ichapter) |
virtual void | setError (char err) |
virtual void | setIndex (long iindex) |
virtual void | setIntros (bool val) |
void | setLocale (const char *name) |
void | setLowerBound (const VerseKey &lb) |
void | setPersist (bool ipersist) |
virtual void | setPosition (SW_POSITION newpos) |
virtual void | setSuffix (char isuffix) |
virtual void | setTestament (char itestament) |
virtual void | setText (const char *ikey, bool checkNormalize) |
virtual void | setText (const char *ikey) |
void | setUpperBound (const VerseKey &ub) |
virtual void | setVerse (int iverse) |
virtual void | setVersificationSystem (const char *name) |
SWDEPRECATED char | Testament () const |
SWDEPRECATED char | Testament (char itestament) |
SWDEPRECATED long | TestamentIndex () const |
SWDEPRECATED VerseKey & | UpperBound (const VerseKey &ub) |
SWDEPRECATED VerseKey & | UpperBound () const |
void | validateCurrentLocale () const |
SWDEPRECATED int | Verse () const |
SWDEPRECATED int | Verse (int iverse) |
VerseKey (const char *ikey=0) | |
VerseKey (const SWKey *ikey) | |
VerseKey (const char *min, const char *max, const char *v11n="KJV") | |
VerseKey (const SWKey &k) | |
VerseKey (const VerseKey &k) | |
virtual | ~VerseKey () |
Static Public Member Functions | |
static const char * | convertToOSIS (const char *inRef, const SWKey *defaultKey) |
Public Attributes | |
int | BMAX [2] |
SW_u64 | userData |
Protected Member Functions | |
void | freshtext () const |
virtual int | getBookFromAbbrev (const char *abbr) const |
SWLocale * | getPrivateLocale () const |
virtual char | parse (bool checkNormalize=true) |
Protected Attributes | |
signed char | book |
bool | boundSet |
signed int | chapter |
char | error |
char * | keytext |
char * | localeName |
const SWClass * | myClass |
bool | persist |
char * | rangeText |
signed char | suffix |
signed char | testament |
signed int | verse |
Private Member Functions | |
void | checkBounds () |
void | init (const char *v11n="KJV") |
void | initBounds () const |
void | setFromOther (const VerseKey &vk) |
Private Attributes | |
char | autonorm |
ListKey | internalListKey |
char | intros |
long | lowerBound |
VerseComponents | lowerBoundComponents |
const VersificationMgr::System * | refSys |
VerseKey * | tmpClone |
long | upperBound |
VerseComponents | upperBoundComponents |
Static Private Attributes | |
static int | instance = 0 |
Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries.
Definition at line 53 of file versekey.h.
VerseKey::VerseKey | ( | const char * | ikey = 0 | ) |
VerseKey Constructor - initializes Instance of VerseKey
ikey | text key (will take various forms of 'BOOK CH:VS'. See parse() for more detailed information) |
Definition at line 105 of file versekey.cpp.
VerseKey Constructor - initializes instance of VerseKey
ikey | base key (will take various forms of 'BOOK CH:VS'. See parse() for more detailed information) |
Definition at line 90 of file versekey.cpp.
VerseKey Constructor - initializes instance of VerseKey with boundariess - see also LowerBound() and UpperBound()
Definition at line 261 of file versekey.cpp.
VerseKey Copy Constructor - will create a new VerseKey
based on an existing SWKey
k | the VerseKey to copy from |
Definition at line 83 of file versekey.cpp.
VerseKey Copy Constructor - will create a new VerseKey
based on an existing one
k | the VerseKey to copy from |
Definition at line 113 of file versekey.cpp.
|
virtual |
|
inline |
Definition at line 375 of file versekey.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1741 of file versekey.cpp.
|
virtual |
clears the boundaries of this VerseKey
Reimplemented from SWKey.
Definition at line 1202 of file versekey.cpp.
|
inline |
|
virtual |
Creates a new SWKey based on the current VerseKey see also the Copy Constructor
Reimplemented from SWKey.
Reimplemented in VerseTreeKey.
Definition at line 278 of file versekey.cpp.
Compares another SWKey object
ikey | key to compare with this one |
Reimplemented from SWKey.
Definition at line 1768 of file versekey.cpp.
Tries to parse a string and convert it into an OSIS reference
inRef | reference string to try to parse |
defaultKey | for details |
Definition at line 1887 of file versekey.cpp.
Copies as much info (position, range, etc.) as possible from another SWKey object
ikey | other SWKey object from which to copy |
Reimplemented from SWKey.
Definition at line 239 of file versekey.cpp.
Equates this VerseKey to another VerseKey
Definition at line 218 of file versekey.cpp.
|
virtual |
Decrements key a number of verses
steps | Number of verses to jump backward |
Reimplemented from SWKey.
Reimplemented in VerseTreeKey.
Definition at line 1374 of file versekey.cpp.
|
inlineinherited |
|
protected |
Refresh keytext based on testament|book|chapter|verse default auto normalization to true default display headings option is false
Definition at line 357 of file versekey.cpp.
|
virtual |
|
virtual |
Definition at line 1275 of file versekey.cpp.
|
protectedvirtual |
Reimplemented in VerseTreeKey.
Definition at line 396 of file versekey.cpp.
|
inlinevirtual |
Definition at line 277 of file versekey.h.
|
virtual |
Get/Set position of this key by Book Name
Definition at line 1265 of file versekey.cpp.
|
virtual |
|
virtual |
Definition at line 1327 of file versekey.cpp.
Use this to get the class definition and inheritance order.
Definition at line 63 of file swobject.h.
|
inlinevirtualinherited |
|
virtual |
Gets index based upon current verse
Reimplemented from SWKey.
Definition at line 1681 of file versekey.cpp.
VerseKey & VerseKey::getLowerBound | ( | ) | const |
gets the lower boundary of this VerseKey
Definition at line 1156 of file versekey.cpp.
|
virtual |
Definition at line 1270 of file versekey.cpp.
|
virtual |
Definition at line 1810 of file versekey.cpp.
|
virtual |
Reimplemented from SWKey.
Definition at line 1873 of file versekey.cpp.
|
protectedinherited |
Definition at line 111 of file swkey.cpp.
|
virtual |
Reimplemented from SWKey.
Definition at line 1832 of file versekey.cpp.
|
virtual |
Reimplemented from SWKey.
Definition at line 1848 of file versekey.cpp.
|
virtual |
Reimplemented from SWKey.
Definition at line 1248 of file versekey.cpp.
|
virtual |
|
virtual |
|
virtual |
Gets index into current testament based upon current verse
Definition at line 1704 of file versekey.cpp.
|
inlinevirtual |
Definition at line 266 of file versekey.h.
|
virtual |
refreshes keytext before returning if cast to a (char *) is requested
Reimplemented from SWKey.
Definition at line 1242 of file versekey.cpp.
VerseKey & VerseKey::getUpperBound | ( | ) | const |
gets the upper boundary of this VerseKey
Definition at line 1179 of file versekey.cpp.
|
virtual |
|
virtual |
Definition at line 1333 of file versekey.cpp.
|
virtual |
Definition at line 316 of file versekey.cpp.
|
inline |
Sets/gets flag that tells VerseKey to include chapter/book/testament/module intros
iheadings | value which to set intros [MAXPOS(char)] - only get |
Definition at line 391 of file versekey.h.
|
virtual |
Increments key a number of verses
steps | Number of verses to jump forward |
Reimplemented from SWKey.
Reimplemented in VerseTreeKey.
Definition at line 1348 of file versekey.cpp.
|
private |
initializes this VerseKey()
Definition at line 56 of file versekey.cpp.
|
private |
Definition at line 1209 of file versekey.cpp.
|
virtual |
Definition at line 1643 of file versekey.cpp.
|
inlinevirtualinherited |
|
virtual |
Definition at line 1669 of file versekey.cpp.
|
inherited |
Gets whether this key should persist in any module to which it is set otherwise just a copy will be used in the module.
|
inlinevirtual |
Whether or not this key can be ++ – incremented
Reimplemented from SWKey.
Reimplemented in VerseTreeKey.
Definition at line 249 of file versekey.h.
|
inline |
|
inline |
|
virtual |
checks limits and normalizes if necessary (e.g. Matthew 29:47 = Mark 2:2). If last verse is exceeded, key is set to last Book CH:VS
Definition at line 1401 of file versekey.cpp.
|
inline |
|
inlinevirtual |
|
protectedvirtual |
Parse a character array into testament|book|chapter|verse
Definition at line 326 of file versekey.cpp.
|
virtual |
Definition at line 515 of file versekey.cpp.
|
inline |
Definition at line 453 of file versekey.h.
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
Only repositions this VerseKey to another VerseKey
Reimplemented from SWKey.
Definition at line 183 of file versekey.cpp.
|
virtual |
Sets flag that tells VerseKey to automatically normalize itself when modified
iautonorm | value which to set autonorm |
Definition at line 1648 of file versekey.cpp.
|
virtual |
|
virtual |
Definition at line 1582 of file versekey.cpp.
|
virtual |
Sets chapter
ichapter | value which to set chapter |
Definition at line 1603 of file versekey.cpp.
|
inlinevirtualinherited |
Definition at line 124 of file versekey.cpp.
|
virtual |
Sets index based upon current verse
iindex | value to set index to |
Reimplemented from SWKey.
Definition at line 1718 of file versekey.cpp.
|
virtual |
The Intros property determine whether or not to include chapter/book/testament/module intros
Definition at line 1663 of file versekey.cpp.
|
inlineinherited |
Definition at line 225 of file swkey.h.
sets the lower boundary for this VerseKey
lb | the new lower boundary for this VerseKey |
Definition at line 1112 of file versekey.cpp.
|
inherited |
Sets whether this key should persist in any module to which it is set otherwise just a copy will be used in the module.
ipersist | value which to set persist; |
|
virtual |
Positions this key
newpos | Position to set to. |
Reimplemented from SWKey.
Reimplemented in VerseTreeKey.
Definition at line 1288 of file versekey.cpp.
|
virtual |
Sets/gets verse suffix
isuffix | value which to set verse suffix |
Definition at line 1634 of file versekey.cpp.
|
virtual |
Sets testament
itestament | value which to set testament |
Definition at line 1548 of file versekey.cpp.
|
inlinevirtual |
Definition at line 220 of file versekey.h.
|
inlinevirtual |
Sets this SWKey with a character string
ikey | string used to set this key |
Reimplemented from SWKey.
Definition at line 221 of file versekey.h.
sets the upper boundary for this VerseKey
ub | the new upper boundary for this VerseKey |
Definition at line 1135 of file versekey.cpp.
|
virtual |
|
virtual |
Definition at line 298 of file versekey.cpp.
|
inline |
|
inline |
|
inline |
Definition at line 423 of file versekey.h.
|
inline |
|
inline |
void VerseKey::validateCurrentLocale | ( | ) | const |
Definition at line 473 of file versekey.cpp.
|
inline |
|
inline |
|
private |
flag for auto normalization
Definition at line 65 of file versekey.h.
int VerseKey::BMAX[2] |
Definition at line 120 of file versekey.h.
|
protected |
Definition at line 96 of file versekey.h.
|
protected |
Definition at line 97 of file versekey.h.
|
staticprivate |
number of instantiated VerseKey objects or derivitives
Definition at line 58 of file versekey.h.
|
private |
Definition at line 59 of file versekey.h.
|
private |
flag for intros on/off
Definition at line 69 of file versekey.h.
|
mutableprivate |
Definition at line 84 of file versekey.h.
|
mutableprivate |
Definition at line 89 of file versekey.h.
Definition at line 55 of file swobject.h.
|
private |
Definition at line 61 of file versekey.h.
|
protected |
Definition at line 99 of file versekey.h.
|
protected |
The Testament: 0 - Module Heading; 1 - Old; 2 - New
Definition at line 95 of file versekey.h.
|
mutableprivate |
Definition at line 85 of file versekey.h.
|
mutableprivate |
Definition at line 84 of file versekey.h.
|
mutableprivate |
Definition at line 89 of file versekey.h.
|
protected |
Definition at line 98 of file versekey.h.