#include <versekey.h>
Inheritance diagram for sword::VerseKey:
Public Member Functions | |
VerseKey (const char *ikey=0) | |
VerseKey Constructor - initializes Instance of VerseKey. | |
VerseKey (const SWKey *ikey) | |
VerseKey Constructor - initializes instance of VerseKey. | |
VerseKey (const char *min, const char *max) | |
VerseKey Constructor - initializes instance of VerseKey with boundariess - see also LowerBound() and UpperBound(). | |
VerseKey (const VerseKey &k) | |
VerseKey Copy Constructor - will create a new VerseKey based on an existing one. | |
virtual | ~VerseKey () |
VerseKey Destructor Cleans up an instance of VerseKey. | |
VerseKey & | LowerBound (const char *lb) |
sets the lower boundary for this VerseKey and returns the new boundary | |
VerseKey & | UpperBound (const char *ub) |
sets the upper boundary for this VerseKey and returns the new boundary | |
VerseKey & | LowerBound () const |
gets the lower boundary of this VerseKey | |
VerseKey & | UpperBound () const |
gets the upper boundary of this VerseKey | |
void | ClearBounds () |
clears the boundaries of this VerseKey | |
virtual SWKey * | clone () const |
Creates a new SWKey based on the current VerseKey see also the Copy Constructor. | |
virtual const char * | getText () const |
refreshes keytext before returning if cast to a (char *) is requested | |
virtual const char * | getShortText () const |
virtual void | setText (const char *ikey) |
Equates this SWKey to a character string. | |
virtual void | copyFrom (const SWKey &ikey) |
Equates this SWKey to another SWKey object. | |
virtual void | copyFrom (const VerseKey &ikey) |
Equates this VerseKey to another VerseKey. | |
virtual void | setPosition (SW_POSITION newpos) |
Positions this key. | |
virtual void | decrement (int steps) |
Decrements key a number of verses. | |
virtual void | increment (int steps) |
Increments key a number of verses. | |
virtual char | Traversable () |
virtual const char * | getBookName () const |
virtual const char * | getBookAbbrev () const |
virtual char | Testament () const |
Gets testament. | |
virtual char | Book () const |
Gets book. | |
virtual int | Chapter () const |
Gets chapter. | |
virtual int | Verse () const |
Gets verse. | |
virtual char | Testament (char itestament) |
Sets/gets testament. | |
virtual char | Book (char ibook) |
Sets/gets book. | |
virtual int | Chapter (int ichapter) |
Sets/gets chapter. | |
virtual int | Verse (int iverse) |
Sets/gets verse. | |
virtual void | Normalize (char autocheck=0) |
checks limits and normalizes if necessary (e.g. | |
virtual char | AutoNormalize (char iautonorm=((char)((unsigned char)(1L<< (sizeof(char)*8-1))-1))) |
Sets/gets flag that tells VerseKey to automatically normalize itself when modified. | |
virtual char | Headings (char iheadings=((char)((unsigned char)(1L<< (sizeof(char)*8-1))-1))) |
Sets/gets flag that tells VerseKey to include chapter/book/testament/module headings. | |
virtual long | NewIndex () const |
virtual long | Index () const |
Gets index based upon current verse. | |
virtual long | Index (long iindex) |
Sets index based upon current verse. | |
virtual const char * | getOSISRef () const |
virtual ListKey | ParseVerseList (const char *buf, const char *defaultKey="Genesis 1:1", bool expandRange=false) |
virtual const char * | getRangeText () const |
virtual int | compare (const SWKey &ikey) |
Compares another SWKey object. | |
virtual int | _compare (const VerseKey &ikey) |
Compares another VerseKey object. | |
virtual void | setBookAbbrevs (const struct abbrev *bookAbbrevs, unsigned int size=0) |
virtual void | setBooks (const char *iBMAX, struct sbook **ibooks) |
virtual void | setLocale (const char *name) |
virtual const char * | getLocale () const |
SWKey & | operator= (const char *ikey) |
SWKey & | operator= (const SWKey &ikey) |
SWKey & | operator= (SW_POSITION pos) |
operator const char * () const | |
bool | operator== (const SWKey &ikey) |
bool | operator!= (const SWKey &ikey) |
virtual bool | operator> (const SWKey &ikey) |
virtual bool | operator< (const SWKey &ikey) |
virtual bool | operator>= (const SWKey &ikey) |
virtual bool | operator<= (const SWKey &ikey) |
SWKey & | operator-= (int steps) |
SWKey & | operator+= (int steps) |
SWKey & | operator++ (int) |
SWKey & | operator-- (int) |
virtual SWKey & | operator= (const VerseKey &ikey) |
Public Attributes | |
const char * | BMAX |
sbook ** | books |
Static Public Attributes | |
const char | builtin_BMAX [2] = {39, 27} |
sbook * | builtin_books [2] = {0,0} |
const struct abbrev | builtin_abbrevs [] |
Private Member Functions | |
int | getBookAbbrev (const char *abbr) |
void | initBounds () const |
void | initstatics () |
initialize and allocate books array | |
void | init () |
initializes this VerseKey() | |
void | freshtext () const |
Refresh keytext based on testament|book|chapter|verse default auto normalization to true default display headings option is false. | |
virtual char | parse () |
Parse a character array into testament|book|chapter|verse. | |
int | findindex (long *array, int size, long value) |
Binary search to find the index closest, but less than the given value. | |
Private Attributes | |
ListKey | internalListKey |
const struct abbrev * | abbrevs |
char * | locale |
int | abbrevsCnt |
signed char | testament |
The Testament: 0 - Old; 1 - New. | |
signed char | book |
signed int | chapter |
signed int | verse |
char | autonorm |
flag for auto normalization | |
char | headings |
flag for headings on/off | |
VerseKey * | lowerBound |
VerseKey * | upperBound |
Static Private Attributes | |
SWClass | classdef |
long * | offsets [2][2] = {{VerseKey::otbks, VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}} |
int | offsize [2][2] |
int | instance = 0 |
number of instantiated VerseKey objects or derivitives | |
sbook | otbooks [] |
sbook | ntbooks [] |
long | otbks [] |
long | otcps [] |
long | ntbks [] |
long | ntcps [] |
int | vm [] |
LocaleCache | localeCache |
|
VerseKey Constructor - initializes Instance of VerseKey.
|
|
VerseKey Constructor - initializes instance of VerseKey.
|
|
VerseKey Constructor - initializes instance of VerseKey with boundariess - see also LowerBound() and UpperBound().
|
|
VerseKey Copy Constructor - will create a new VerseKey based on an existing one.
|
|
Compares another VerseKey object.
|
|
Sets/gets flag that tells VerseKey to automatically normalize itself when modified.
|
|
Sets/gets book.
|
|
Gets book.
|
|
Sets/gets chapter.
|
|
Gets chapter.
|
|
Compares another SWKey object.
Reimplemented from sword::SWKey. |
|
Equates this SWKey to another SWKey object.
Reimplemented from sword::SWKey. |
|
Decrements key a number of verses.
Reimplemented from sword::SWKey. |
|
Binary search to find the index closest, but less than the given value.
|
|
Sets/gets flag that tells VerseKey to include chapter/book/testament/module headings.
|
|
Increments key a number of verses.
Reimplemented from sword::SWKey. |
|
Sets index based upon current verse.
Reimplemented from sword::SWKey. |
|
Gets index based upon current verse.
Reimplemented from sword::SWKey. |
|
gets the lower boundary of this VerseKey
|
|
sets the lower boundary for this VerseKey and returns the new boundary
|
|
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
|
|
Parse a character array into testament|book|chapter|verse.
|
|
Positions this key.
Reimplemented from sword::SWKey. |
|
Equates this SWKey to a character string.
Reimplemented from sword::SWKey. |
|
Sets/gets testament.
|
|
Gets testament.
|
|
gets the upper boundary of this VerseKey
|
|
sets the upper boundary for this VerseKey and returns the new boundary
|
|
Sets/gets verse.
|
|
Gets verse.
|