Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a74ec78bdb789d910d054e3918f3f007 > files > 294

libsword1-devel-1.5.5-2mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>VerseKey class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center>
<hr><h1>VerseKey  Class Reference</h1>Class VerseKey The <a class="el" href="class_s_w_key.html">SWKey</a> implementation used for verse based modules like Bibles or commentaries. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="versekey_8h-source.html">versekey.h</a>&gt;</code>
<p>
Inheritance diagram for VerseKey:<p><center><img src="class_verse_key__inherit__graph.png" border="0" usemap="#_verse_key__inherit__map" alt="Inheritance graph"></center>
<map name="_verse_key__inherit__map">
<area href="class_s_w_key.html" shape="rect" coords="22,84,78,103" alt="">
<area href="class_s_w_object.html" shape="rect" coords="14,15,86,33" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for VerseKey:<p><center><img src="class_verse_key__coll__graph.png" border="0" usemap="#_verse_key__coll__map" alt="Collaboration graph"></center>
<map name="_verse_key__coll__map">
<area href="class_s_w_key.html" shape="rect" coords="122,196,178,215" alt="">
<area href="class_list_key.html" shape="rect" coords="161,287,214,305" alt="">
<area href="class_s_w_object.html" shape="rect" coords="183,105,255,124" alt="">
<area href="class_s_w_class.html" shape="rect" coords="107,15,171,33" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_verse_key-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a0">VerseKey</a> (const char *ikey=0)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>VerseKey Constructor - initializes Instance of VerseKey.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a1">VerseKey</a> (const <a class="el" href="class_s_w_key.html">SWKey</a> *ikey)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>VerseKey Constructor - initializes instance of VerseKey.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a2">VerseKey</a> (const char *min, const char *max)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>VerseKey Constructor - initializes instance of VerseKey with boundariess - see also <a class="el" href="class_verse_key.html#a5">LowerBound</a> and <a class="el" href="class_verse_key.html#a6">UpperBound</a>.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a3">VerseKey</a> (const VerseKey &amp;k)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>VerseKey Copy Constructor - will create a new VerseKey based on an existing one.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a4" doxytag="VerseKey::~VerseKey"></a>
virtual&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a4">~VerseKey</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>VerseKey Destructor Cleans up an instance of VerseKey.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>VerseKey &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a5">LowerBound</a> (const char *lb)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>sets the lower boundary for this VerseKey and returns the new boundary.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>VerseKey &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a6">UpperBound</a> (const char *ub)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>sets the upper boundary for this VerseKey and returns the new boundary.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>VerseKey &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a7">LowerBound</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>gets the lower boundary of this VerseKey.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>VerseKey &amp;&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a8">UpperBound</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>gets the upper boundary of this VerseKey.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a9" doxytag="VerseKey::ClearBounds"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a9">ClearBounds</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>clears the boundaries of this VerseKey.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a10" doxytag="VerseKey::clone"></a>
virtual <a class="el" href="class_s_w_key.html">SWKey</a> *&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a10">clone</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a new <a class="el" href="class_s_w_key.html">SWKey</a> based on the current VerseKey see also the Copy Constructor.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a11" doxytag="VerseKey::getText"></a>
virtual const char *&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a11">getText</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>refreshes keytext before returning if cast to a (char *) is requested.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a12" doxytag="VerseKey::getShortText"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getShortText</b> () const</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a13">setText</a> (const char *ikey)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Equates this <a class="el" href="class_s_w_key.html">SWKey</a> to a character string.</em> <a href="#a13">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a14">copyFrom</a> (const <a class="el" href="class_s_w_key.html">SWKey</a> &amp;ikey)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Equates this <a class="el" href="class_s_w_key.html">SWKey</a> to another <a class="el" href="class_s_w_key.html">SWKey</a> object.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a15" doxytag="VerseKey::copyFrom"></a>
virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a15">copyFrom</a> (const VerseKey &amp;ikey)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Equates this VerseKey to another VerseKey.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a16">setPosition</a> (SW_POSITION)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Positions this key.</em> <a href="#a16">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a17">decrement</a> (int step)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Decrements key a number of verses.</em> <a href="#a17">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a18">increment</a> (int step)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Increments key a number of verses.</em> <a href="#a18">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a19" doxytag="VerseKey::Traversable"></a>
virtual char&nbsp;</td><td valign=bottom><b>Traversable</b> ()</td></tr>
<tr><td nowrap align=right valign=top><a name="a20" doxytag="VerseKey::getBookName"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getBookName</b> () const</td></tr>
<tr><td nowrap align=right valign=top><a name="a21" doxytag="VerseKey::getBookAbbrev"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getBookAbbrev</b> () const</td></tr>
<tr><td nowrap align=right valign=top>virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a22">Testament</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Gets testament.</em> <a href="#a22">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a23">Book</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Gets book.</em> <a href="#a23">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a24">Chapter</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Gets chapter.</em> <a href="#a24">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a25">Verse</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Gets verse.</em> <a href="#a25">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a26">Testament</a> (char itestament)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets/gets testament.</em> <a href="#a26">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a27">Book</a> (char ibook)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets/gets book.</em> <a href="#a27">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a28">Chapter</a> (int ichapter)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets/gets chapter.</em> <a href="#a28">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a29">Verse</a> (int iverse)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets/gets verse.</em> <a href="#a29">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a30">Normalize</a> (char autocheck=0)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>checks limits and normalizes if necessary (e.g.</em> <a href="#a30">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a31">AutoNormalize</a> (char iautonorm=MAXPOS(char))</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets/gets flag that tells VerseKey to automatically normalize itself when modified.</em> <a href="#a31">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a32">Headings</a> (char iheadings=MAXPOS(char))</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets/gets flag that tells VerseKey to include chapter/book/testament/module headings.</em> <a href="#a32">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a33" doxytag="VerseKey::NewIndex"></a>
virtual long&nbsp;</td><td valign=bottom><b>NewIndex</b> () const</td></tr>
<tr><td nowrap align=right valign=top>virtual long&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a34">Index</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Gets index based upon current verse.</em> <a href="#a34">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual long&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a35">Index</a> (long iindex)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets index based upon current verse.</em> <a href="#a35">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a36" doxytag="VerseKey::getOSISRef"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getOSISRef</b> () const</td></tr>
<tr><td nowrap align=right valign=top><a name="a37" doxytag="VerseKey::ParseVerseList"></a>
virtual <a class="el" href="class_list_key.html">ListKey</a>&nbsp;</td><td valign=bottom><b>ParseVerseList</b> (const char *buf, const char *defaultKey="Genesis 1:1", bool expandRange=false)</td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a38">compare</a> (const <a class="el" href="class_s_w_key.html">SWKey</a> &amp;ikey)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Compares another <a class="el" href="class_s_w_key.html">SWKey</a> object.</em> <a href="#a38">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#a39">_compare</a> (const VerseKey &amp;ikey)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Compares another VerseKey object.</em> <a href="#a39">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a40" doxytag="VerseKey::setBookAbbrevs"></a>
virtual void&nbsp;</td><td valign=bottom><b>setBookAbbrevs</b> (const struct abbrev *bookAbbrevs, unsigned int size=0)</td></tr>
<tr><td nowrap align=right valign=top><a name="a41" doxytag="VerseKey::setBooks"></a>
virtual void&nbsp;</td><td valign=bottom><b>setBooks</b> (const char *iBMAX, struct sbook **ibooks)</td></tr>
<tr><td nowrap align=right valign=top><a name="a42" doxytag="VerseKey::setLocale"></a>
virtual void&nbsp;</td><td valign=bottom><b>setLocale</b> (const char *name)</td></tr>
<tr><td nowrap align=right valign=top><a name="a43" doxytag="VerseKey::getLocale"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getLocale</b> () const</td></tr>
<tr><td nowrap align=right valign=top><a name="a44" doxytag="VerseKey::operator="></a>
virtual SWKEY_OPERATORS <a class="el" href="class_s_w_key.html">SWKey</a> &amp;&nbsp;</td><td valign=bottom><b>operator=</b> (const VerseKey &amp;ikey)</td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="m0" doxytag="VerseKey::BMAX"></a>
const char *&nbsp;</td><td valign=bottom><b>BMAX</b></td></tr>
<tr><td nowrap align=right valign=top><a name="m1" doxytag="VerseKey::books"></a>
sbook **&nbsp;</td><td valign=bottom><b>books</b></td></tr>
<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="p0" doxytag="VerseKey::builtin_BMAX"></a>
const char&nbsp;</td><td valign=bottom><b>builtin_BMAX</b> [2] = {39, 27}</td></tr>
<tr><td nowrap align=right valign=top><a name="p1" doxytag="VerseKey::builtin_books"></a>
sbook *&nbsp;</td><td valign=bottom><b>builtin_books</b> [2] = {0,0}</td></tr>
<tr><td nowrap align=right valign=top><a name="p2" doxytag="VerseKey::builtin_abbrevs"></a>
const struct abbrev&nbsp;</td><td valign=bottom><b>builtin_abbrevs</b> []</td></tr>
<tr><td colspan=2><br><h2>Private Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="c0" doxytag="VerseKey::getBookAbbrev"></a>
int&nbsp;</td><td valign=bottom><b>getBookAbbrev</b> (const char *abbr)</td></tr>
<tr><td nowrap align=right valign=top><a name="c1" doxytag="VerseKey::initBounds"></a>
void&nbsp;</td><td valign=bottom><b>initBounds</b> () const</td></tr>
<tr><td nowrap align=right valign=top><a name="c2" doxytag="VerseKey::initstatics"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#c2">initstatics</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>initialize and allocate books array.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="c3" doxytag="VerseKey::init"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#c3">init</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>initializes this <a class="el" href="class_verse_key.html#a0">VerseKey</a>().</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="c4" doxytag="VerseKey::freshtext"></a>
void&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#c4">freshtext</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Refresh keytext based on testament|book|chapter|verse default auto normalization to true default display headings option is false.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="c5" doxytag="VerseKey::parse"></a>
virtual char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#c5">parse</a> ()</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Parse a character array into testament|book|chapter|verse.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#c6">findindex</a> (long *array, int size, long value)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Binary search to find the index closest, but less than the given value.</em> <a href="#c6">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="o0" doxytag="VerseKey::internalListKey"></a>
<a class="el" href="class_list_key.html">ListKey</a>&nbsp;</td><td valign=bottom><b>internalListKey</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o1" doxytag="VerseKey::abbrevs"></a>
const struct abbrev *&nbsp;</td><td valign=bottom><b>abbrevs</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o2" doxytag="VerseKey::locale"></a>
char *&nbsp;</td><td valign=bottom><b>locale</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o3" doxytag="VerseKey::abbrevsCnt"></a>
int&nbsp;</td><td valign=bottom><b>abbrevsCnt</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o4" doxytag="VerseKey::testament"></a>
signed char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#o4">testament</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>The Testament: 0 - Old; 1 - New.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="o5" doxytag="VerseKey::book"></a>
signed char&nbsp;</td><td valign=bottom><b>book</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o6" doxytag="VerseKey::chapter"></a>
signed int&nbsp;</td><td valign=bottom><b>chapter</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o7" doxytag="VerseKey::verse"></a>
signed int&nbsp;</td><td valign=bottom><b>verse</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o8" doxytag="VerseKey::autonorm"></a>
char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#o8">autonorm</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>flag for auto normalization.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="o9" doxytag="VerseKey::headings"></a>
char&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#o9">headings</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>flag for headings on/off.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="o10" doxytag="VerseKey::lowerBound"></a>
VerseKey *&nbsp;</td><td valign=bottom><b>lowerBound</b></td></tr>
<tr><td nowrap align=right valign=top><a name="o11" doxytag="VerseKey::upperBound"></a>
VerseKey *&nbsp;</td><td valign=bottom><b>upperBound</b></td></tr>
<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="r0" doxytag="VerseKey::classdef"></a>
<a class="el" href="class_s_w_class.html">SWClass</a>&nbsp;</td><td valign=bottom><b>classdef</b></td></tr>
<tr><td nowrap align=right valign=top><a name="r1" doxytag="VerseKey::offsets"></a>
long *&nbsp;</td><td valign=bottom><b>offsets</b> [2][2] = {{VerseKey::otbks, VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}}</td></tr>
<tr><td nowrap align=right valign=top><a name="r2" doxytag="VerseKey::offsize"></a>
int&nbsp;</td><td valign=bottom><b>offsize</b> [2][2]</td></tr>
<tr><td nowrap align=right valign=top><a name="r3" doxytag="VerseKey::instance"></a>
int&nbsp;</td><td valign=bottom><a class="el" href="class_verse_key.html#r3">instance</a> = 0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>number of instantiated VerseKey objects or derivitives.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="r4" doxytag="VerseKey::otbooks"></a>
sbook&nbsp;</td><td valign=bottom><b>otbooks</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r5" doxytag="VerseKey::ntbooks"></a>
sbook&nbsp;</td><td valign=bottom><b>ntbooks</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r6" doxytag="VerseKey::otbks"></a>
long&nbsp;</td><td valign=bottom><b>otbks</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r7" doxytag="VerseKey::otcps"></a>
long&nbsp;</td><td valign=bottom><b>otcps</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r8" doxytag="VerseKey::ntbks"></a>
long&nbsp;</td><td valign=bottom><b>ntbks</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r9" doxytag="VerseKey::ntcps"></a>
long&nbsp;</td><td valign=bottom><b>ntcps</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r10" doxytag="VerseKey::vm"></a>
int&nbsp;</td><td valign=bottom><b>vm</b> []</td></tr>
<tr><td nowrap align=right valign=top><a name="r11" doxytag="VerseKey::localeCache"></a>
LocaleCache&nbsp;</td><td valign=bottom><b>localeCache</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class VerseKey The <a class="el" href="class_s_w_key.html">SWKey</a> implementation used for verse based modules like Bibles or commentaries.
<p>

<p>
Definition at line <a class="el" href="versekey_8h-source.html#l00072">72</a> of file <a class="el" href="versekey_8h-source.html">versekey.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="VerseKey::VerseKey"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey::VerseKey </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em> = 0          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
VerseKey Constructor - initializes Instance of VerseKey.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
text key (will take various forms of 'BOOK CH:VS'. See <a class="el" href="class_verse_key.html#c5">parse</a> for more detailed information) </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00089">89</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00048">init</a>(), and <a class="el" href="versekey_8cpp-source.html#l00231">parse</a>().
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l00120">clone</a>().
<p>
<div class="fragment"><pre>00089                                    : <a class="code" href="class_s_w_key.html#a0">SWKey</a>(ikey)
00090 {
00091         <a class="code" href="class_verse_key.html#c3">init</a>();
00092         <font class="keywordflow">if</font> (ikey)
00093                 <a class="code" href="class_verse_key.html#c5">parse</a>();
00094 }
</pre></div>    </td>
  </tr>
</table>
<a name="a1" doxytag="VerseKey::VerseKey"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey::VerseKey </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="class_s_w_key.html">SWKey</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
VerseKey Constructor - initializes instance of VerseKey.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
base key (will take various forms of 'BOOK CH:VS'. See <a class="el" href="class_verse_key.html#c5">parse</a> for more detailed information) </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00074">74</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00048">init</a>(), and <a class="el" href="versekey_8cpp-source.html#l00231">parse</a>().
<p>
<div class="fragment"><pre>00074                                     : <a class="code" href="class_s_w_key.html#a0">SWKey</a>(*ikey)
00075 {
00076         <a class="code" href="class_verse_key.html#c3">init</a>();
00077         <font class="keywordflow">if</font> (ikey)
00078                 <a class="code" href="class_verse_key.html#c5">parse</a>();
00079 }
</pre></div>    </td>
  </tr>
</table>
<a name="a2" doxytag="VerseKey::VerseKey"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey::VerseKey </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>min</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>max</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
VerseKey Constructor - initializes instance of VerseKey with boundariess - see also <a class="el" href="class_verse_key.html#a5">LowerBound</a> and <a class="el" href="class_verse_key.html#a6">UpperBound</a>.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>min</em>&nbsp;</td><td>
the lower boundary of the new VerseKey </td></tr>
<tr><td valign=top><em>max</em>&nbsp;</td><td>
the upper boundary of the new VerseKey </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00111">111</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00048">init</a>(), <a class="el" href="versekey_8cpp-source.html#l00761">LowerBound</a>(), <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>(), and <a class="el" href="versekey_8cpp-source.html#l00774">UpperBound</a>().
<p>
<div class="fragment"><pre>00111                                                    : <a class="code" href="class_s_w_key.html#a0">SWKey</a>()
00112 {
00113         <a class="code" href="class_verse_key.html#c3">init</a>();
00114         <a class="code" href="class_verse_key.html#a7">LowerBound</a>(min);
00115         <a class="code" href="class_verse_key.html#a8">UpperBound</a>(max);
00116         <a class="code" href="class_verse_key.html#a16">setPosition</a>(TOP);
00117 }
</pre></div>    </td>
  </tr>
</table>
<a name="a3" doxytag="VerseKey::VerseKey"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey::VerseKey </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const VerseKey &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>k</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
VerseKey Copy Constructor - will create a new VerseKey based on an existing one.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>k</em>&nbsp;</td><td>
the VerseKey to copy from </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a39" doxytag="VerseKey::_compare"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::_compare </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const VerseKey &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compares another VerseKey object.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
key to compare with this one </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
&gt;0 if this VerseKey is greater than compare VerseKey, &lt;0 if this VerseKey is smaller than compare VerseKey, 0 if the keys are the same </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01402">1402</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l01075">Book</a>(), <a class="el" href="versekey_8cpp-source.html#l01087">Chapter</a>(), <a class="el" href="versekey_8cpp-source.html#l01063">Testament</a>(), and <a class="el" href="versekey_8cpp-source.html#l01099">Verse</a>().
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01385">compare</a>(), <a class="el" href="versekey_8cpp-source.html#l01316">Index</a>(), and <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>01403 {
01404         <font class="keywordtype">long</font> keyval1 = 0;
01405         <font class="keywordtype">long</font> keyval2 = 0;
01406 
01407         keyval1 += <a class="code" href="class_verse_key.html#a22">Testament</a>() * 1000000000;
01408         keyval2 += ivkey.<a class="code" href="class_verse_key.html#a22">Testament</a>() * 1000000000;
01409         keyval1 += <a class="code" href="class_verse_key.html#a23">Book</a>() * 1000000;
01410         keyval2 += ivkey.<a class="code" href="class_verse_key.html#a23">Book</a>() * 1000000;
01411         keyval1 += <a class="code" href="class_verse_key.html#a24">Chapter</a>() * 1000;
01412         keyval2 += ivkey.<a class="code" href="class_verse_key.html#a24">Chapter</a>() * 1000;
01413         keyval1 += <a class="code" href="class_verse_key.html#a25">Verse</a>();
01414         keyval2 += ivkey.<a class="code" href="class_verse_key.html#a25">Verse</a>();
01415         keyval1 -= keyval2;
01416         keyval1 = (keyval1) ? ((keyval1 &gt; 0) ? 1 : -1) <font class="comment">/*keyval1/labs(keyval1)*/</font>:0; <font class="comment">// -1 | 0 | 1</font>
01417         <font class="keywordflow">return</font> keyval1;
01418 }
</pre></div>    </td>
  </tr>
</table>
<a name="a31" doxytag="VerseKey::AutoNormalize"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char VerseKey::AutoNormalize </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>iautonorm</em> = MAXPOS(char)          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets/gets flag that tells VerseKey to automatically normalize itself when modified.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>iautonorm</em>&nbsp;</td><td>
value which to set autonorm [MAXPOS(char)] - only get </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
if unchanged -&gt; value of autonorm, if changed -&gt; previous value of autonorm </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01203">1203</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8h-source.html#l00121">autonorm</a>, and <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>01204 {
01205         <font class="keywordtype">char</font> retval = <a class="code" href="class_verse_key.html#o8">autonorm</a>;
01206 
01207         <font class="keywordflow">if</font> (iautonorm != MAXPOS(<font class="keywordtype">char</font>)) {
01208                 <a class="code" href="class_verse_key.html#o8">autonorm</a> = iautonorm;
01209                 <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
01210         }
01211         <font class="keywordflow">return</font> retval;
01212 }
</pre></div>    </td>
  </tr>
</table>
<a name="a27" doxytag="VerseKey::Book"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char VerseKey::Book </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ibook</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets/gets book.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ibook</em>&nbsp;</td><td>
value which to set book [MAXPOS(char)] - only get </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
if unchanged -&gt; value of book, if changed -&gt; previous value of book </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01137">1137</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l01087">Chapter</a>(), and <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>01138 {
01139         <font class="keywordtype">char</font> retval = book;
01140 
01141         <a class="code" href="class_verse_key.html#a24">Chapter</a>(1);
01142         book = ibook;
01143         <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
01144 
01145         <font class="keywordflow">return</font> retval;
01146 }
</pre></div>    </td>
  </tr>
</table>
<a name="a23" doxytag="VerseKey::Book"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char VerseKey::Book </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Gets book.
<p>
<dl compact><dt><b>
Returns: </b><dd>
value of book </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01075">1075</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>(), and <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>().
<p>
<div class="fragment"><pre>01076 {
01077         <font class="keywordflow">return</font> book;
01078 }
</pre></div>    </td>
  </tr>
</table>
<a name="a28" doxytag="VerseKey::Chapter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::Chapter </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ichapter</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets/gets chapter.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ichapter</em>&nbsp;</td><td>
value which to set chapter [MAXPOS(int)] - only get </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
if unchanged -&gt; value of chapter, if changed -&gt; previous value of chapter </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01159">1159</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>(), and <a class="el" href="versekey_8cpp-source.html#l01099">Verse</a>().
<p>
<div class="fragment"><pre>01160 {
01161         <font class="keywordtype">int</font> retval = chapter;
01162 
01163         <a class="code" href="class_verse_key.html#a25">Verse</a>(1);
01164         chapter = ichapter;
01165         <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
01166 
01167         <font class="keywordflow">return</font> retval;
01168 }
</pre></div>    </td>
  </tr>
</table>
<a name="a24" doxytag="VerseKey::Chapter"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::Chapter </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Gets chapter.
<p>
<dl compact><dt><b>
Returns: </b><dd>
value of chapter </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01087">1087</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>(), <a class="el" href="versekey_8cpp-source.html#l01137">Book</a>(), and <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>().
<p>
<div class="fragment"><pre>01088 {
01089         <font class="keywordflow">return</font> chapter;
01090 }
</pre></div>    </td>
  </tr>
</table>
<a name="a38" doxytag="VerseKey::compare"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::compare </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="class_s_w_key.html">SWKey</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compares another <a class="el" href="class_s_w_key.html">SWKey</a> object.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
key to compare with this one </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
&gt;0 if this VerseKey is greater than compare <a class="el" href="class_s_w_key.html">SWKey</a>, &lt;0 if this VerseKey is smaller than compare <a class="el" href="class_s_w_key.html">SWKey</a>, 0 if the keys are the same </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a11">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01385">1385</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>().
<p>
<div class="fragment"><pre>01386 {
01387         <a class="code" href="class_verse_key.html">VerseKey</a> ivkey = (<font class="keyword">const</font> <font class="keywordtype">char</font> *)ikey;
01388         <font class="keywordflow">return</font> <a class="code" href="class_verse_key.html#a39">_compare</a>(ivkey);
01389 }
</pre></div>    </td>
  </tr>
</table>
<a name="a14" doxytag="VerseKey::copyFrom"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void VerseKey::copyFrom </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="class_s_w_key.html">SWKey</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Equates this <a class="el" href="class_s_w_key.html">SWKey</a> to another <a class="el" href="class_s_w_key.html">SWKey</a> object.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
other swkey object </td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a8">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00833">833</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="swkey_8cpp-source.html#l00126">SWKey::copyFrom</a>(), and <a class="el" href="versekey_8cpp-source.html#l00231">parse</a>().
<p>
<div class="fragment"><pre>00833                                          {
00834         <a class="code" href="class_s_w_key.html#a8">SWKey::copyFrom</a>(ikey);
00835 
00836         <a class="code" href="class_verse_key.html#c5">parse</a>();
00837 }
</pre></div>    </td>
  </tr>
</table>
<a name="a17" doxytag="VerseKey::decrement"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void VerseKey::decrement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>step</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Decrements key a number of verses.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>decrement</em>&nbsp;</td><td>
Number of verses to jump backward </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
*this </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a14">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00941">941</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="swkey_8cpp-source.html#l00100">SWKey::Error</a>(), <a class="el" href="versekey_8h-source.html#l00124">headings</a>, and <a class="el" href="versekey_8cpp-source.html#l01271">Index</a>().
<p>
<div class="fragment"><pre>00941                                  {
00942         <font class="keywordtype">char</font> ierror = 0;
00943 
00944         <a class="code" href="class_verse_key.html#a34">Index</a>(<a class="code" href="class_verse_key.html#a34">Index</a>() - step);
00945         <font class="keywordflow">while</font> ((!verse) &amp;&amp; (!<a class="code" href="class_verse_key.html#o9">headings</a>) &amp;&amp; (!ierror)) {
00946                 <a class="code" href="class_verse_key.html#a34">Index</a>(<a class="code" href="class_verse_key.html#a34">Index</a>() - 1);
00947                 ierror = <a class="code" href="class_s_w_key.html#a6">Error</a>();
00948         }
00949         <font class="keywordflow">if</font> ((ierror) &amp;&amp; (!<a class="code" href="class_verse_key.html#o9">headings</a>))
00950                 (*this)++;
00951 
00952         error = (ierror) ? ierror : error;
00953 }
</pre></div>    </td>
  </tr>
</table>
<a name="c6" doxytag="VerseKey::findindex"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::findindex </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>array</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>size</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>long&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>value</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Binary search to find the index closest, but less than the given value.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>array</em>&nbsp;</td><td>
long * to array to search </td></tr>
<tr><td valign=top><em>size</em>&nbsp;</td><td>
number of elements in the array </td></tr>
<tr><td valign=top><em>value</em>&nbsp;</td><td>
value to find </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the index into the array that is less than but closest to value </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01249">1249</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01316">Index</a>().
<p>
<div class="fragment"><pre>01250 {
01251         <font class="keywordtype">int</font> lbound, ubound, tval;
01252 
01253         lbound = 0;
01254         ubound = size - 1;
01255         <font class="keywordflow">while</font> ((ubound - lbound) &gt; 1) {
01256                 tval = lbound + (ubound-lbound)/2;
01257                 <font class="keywordflow">if</font> (array[tval] &lt;= value)
01258                         lbound = tval;
01259                 <font class="keywordflow">else</font> ubound = tval;
01260         }
01261         <font class="keywordflow">return</font> (array[ubound] &lt;= value) ? ubound : lbound;
01262 }
</pre></div>    </td>
  </tr>
</table>
<a name="a32" doxytag="VerseKey::Headings"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char VerseKey::Headings </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>iheadings</em> = MAXPOS(char)          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets/gets flag that tells VerseKey to include chapter/book/testament/module headings.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>iheadings</em>&nbsp;</td><td>
value which to set headings [MAXPOS(char)] - only get </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
if unchanged -&gt; value of headings, if changed -&gt; previous value of headings </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01226">1226</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8h-source.html#l00124">headings</a>, and <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>01227 {
01228         <font class="keywordtype">char</font> retval = <a class="code" href="class_verse_key.html#o9">headings</a>;
01229 
01230         <font class="keywordflow">if</font> (iheadings != MAXPOS(<font class="keywordtype">char</font>)) {
01231                 <a class="code" href="class_verse_key.html#o9">headings</a> = iheadings;
01232                 <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
01233         }
01234         <font class="keywordflow">return</font> retval;
01235 }
</pre></div>    </td>
  </tr>
</table>
<a name="a18" doxytag="VerseKey::increment"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void VerseKey::increment </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>step</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Increments key a number of verses.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>increment</em>&nbsp;</td><td>
Number of verses to jump forward </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
*this </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a15">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00921">921</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="swkey_8cpp-source.html#l00100">SWKey::Error</a>(), <a class="el" href="versekey_8h-source.html#l00124">headings</a>, and <a class="el" href="versekey_8cpp-source.html#l01271">Index</a>().
<p>
<div class="fragment"><pre>00921                                  {
00922         <font class="keywordtype">char</font> ierror = 0;
00923         <a class="code" href="class_verse_key.html#a34">Index</a>(<a class="code" href="class_verse_key.html#a34">Index</a>() + step);
00924         <font class="keywordflow">while</font> ((!verse) &amp;&amp; (!<a class="code" href="class_verse_key.html#o9">headings</a>) &amp;&amp; (!ierror)) {
00925                 <a class="code" href="class_verse_key.html#a34">Index</a>(<a class="code" href="class_verse_key.html#a34">Index</a>() + 1);
00926                 ierror = <a class="code" href="class_s_w_key.html#a6">Error</a>();
00927         }
00928 
00929         error = (ierror) ? ierror : error;
00930 }
</pre></div>    </td>
  </tr>
</table>
<a name="a35" doxytag="VerseKey::Index"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> long VerseKey::Index </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">long&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>iindex</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets index based upon current verse.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>iindex</em>&nbsp;</td><td>
value to set index to </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
offset </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01316">1316</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>(), <a class="el" href="versekey_8cpp-source.html#l01249">findindex</a>(), <a class="el" href="versekey_8cpp-source.html#l01271">Index</a>(), <a class="el" href="versekey_8cpp-source.html#l00761">LowerBound</a>(), <a class="el" href="versekey_8h-source.html#l00115">testament</a>, and <a class="el" href="versekey_8cpp-source.html#l00774">UpperBound</a>().
<p>
<div class="fragment"><pre>01317 {
01318         <font class="keywordtype">long</font>  offset;
01319 
01320 <font class="comment">// This is the dirty stuff --------------------------------------------</font>
01321 
01322         <font class="keywordflow">if</font> (!<a class="code" href="class_verse_key.html#o4">testament</a>)
01323                 <a class="code" href="class_verse_key.html#o4">testament</a> = 1;
01324 
01325         <font class="keywordflow">if</font> (iindex &lt; 1) {                               <font class="comment">// if (-) or module heading</font>
01326                 <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#o4">testament</a> &lt; 2) {
01327                         <font class="keywordflow">if</font> (iindex &lt; 0) {
01328                                 <a class="code" href="class_verse_key.html#o4">testament</a> = 0;  <font class="comment">// previously we changed 0 -&gt; 1</font>
01329                                 error     = KEYERR_OUTOFBOUNDS;
01330                         }
01331                         <font class="keywordflow">else</font> <a class="code" href="class_verse_key.html#o4">testament</a> = 0;             <font class="comment">// we want module heading</font>
01332                 }
01333                 <font class="keywordflow">else</font> {
01334                         <a class="code" href="class_verse_key.html#o4">testament</a>--;
01335                         iindex = (offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][1][offsize[<a class="code" href="class_verse_key.html#o4">testament</a>-1][1]-1] + books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][BMAX[<a class="code" href="class_verse_key.html#o4">testament</a>-1]-1].versemax[books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][BMAX[<a class="code" href="class_verse_key.html#o4">testament</a>-1]-1].chapmax-1]) + iindex; <font class="comment">// What a doozy! ((offset of last chapter + number of verses in the last chapter) + iindex)</font>
01336                 }
01337         }
01338 
01339 <font class="comment">// --------------------------------------------------------------------</font>
01340 
01341 
01342         <font class="keywordflow">if</font> (testament) {
01343                 <font class="keywordflow">if</font> ((!error) &amp;&amp; (iindex)) {
01344                         offset  = <a class="code" href="class_verse_key.html#c6">findindex</a>(offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][1], offsize[<a class="code" href="class_verse_key.html#o4">testament</a>-1][1], iindex);
01345                         verse   = iindex - offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][1][offset];
01346                         book    = <a class="code" href="class_verse_key.html#c6">findindex</a>(offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][0], offsize[<a class="code" href="class_verse_key.html#o4">testament</a>-1][0], offset);
01347                         chapter = offset - offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][0][VerseKey::book];
01348                         verse   = (chapter) ? verse : 0;  <font class="comment">// funny check. if we are index=1 (testmt header) all gets set to 0 exept verse.  Don't know why.  Fix if you figure out.  Think its in the offsets table.</font>
01349                         <font class="keywordflow">if</font> (verse) {            <font class="comment">// only check if -1 won't give negative</font>
01350                                 <font class="keywordflow">if</font> (verse &gt; books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter-1]) {
01351                                         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#o4">testament</a> &gt; 1) {
01352                                                 verse = books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter-1];
01353                                                 error = KEYERR_OUTOFBOUNDS;
01354                                         }
01355                                         <font class="keywordflow">else</font> {
01356                                                 <a class="code" href="class_verse_key.html#o4">testament</a>++;
01357                                                 <a class="code" href="class_verse_key.html#a34">Index</a>(verse - books[<a class="code" href="class_verse_key.html#o4">testament</a>-2][book-1].versemax[chapter-1]);
01358                                         }
01359                                 }
01360                         }
01361                 }
01362         }
01363         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#a39">_compare</a>(<a class="code" href="class_verse_key.html#a8">UpperBound</a>()) &gt; 0) {
01364                 *<font class="keyword">this</font> = <a class="code" href="class_verse_key.html#a8">UpperBound</a>();
01365                 error = KEYERR_OUTOFBOUNDS;
01366         }
01367         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#a39">_compare</a>(<a class="code" href="class_verse_key.html#a7">LowerBound</a>()) &lt; 0) {
01368                 *<font class="keyword">this</font> = <a class="code" href="class_verse_key.html#a7">LowerBound</a>();
01369                 error = KEYERR_OUTOFBOUNDS;
01370         }
01371         <font class="keywordflow">return</font> <a class="code" href="class_verse_key.html#a34">Index</a>();
01372 }
</pre></div>    </td>
  </tr>
</table>
<a name="a34" doxytag="VerseKey::Index"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> long VerseKey::Index </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Gets index based upon current verse.
<p>
<dl compact><dt><b>
Returns: </b><dd>
offset </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a17">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01271">1271</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8h-source.html#l00115">testament</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l00941">decrement</a>(), <a class="el" href="versekey_8cpp-source.html#l00921">increment</a>(), and <a class="el" href="versekey_8cpp-source.html#l01316">Index</a>().
<p>
<div class="fragment"><pre>01272 {
01273         <font class="keywordtype">long</font>  offset;
01274 
01275         <font class="keywordflow">if</font> (!<a class="code" href="class_verse_key.html#o4">testament</a>) { <font class="comment">// if we want module heading</font>
01276                 offset = 0;
01277                 verse  = 0;
01278         }
01279         <font class="keywordflow">else</font> {
01280                 <font class="keywordflow">if</font> (!book)
01281                         chapter = 0;
01282                 <font class="keywordflow">if</font> (!chapter)
01283                         verse   = 0;
01284 
01285                 offset = offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][0][book];
01286                 offset = offsets[<a class="code" href="class_verse_key.html#o4">testament</a>-1][1][(int)offset + chapter];
01287                 <font class="keywordflow">if</font> (!(offset|verse)) <font class="comment">// if we have a testament but nothing else.</font>
01288                         offset = 1;
01289         }
01290         <font class="keywordflow">return</font> (offset + verse);
01291 }
</pre></div>    </td>
  </tr>
</table>
<a name="a7" doxytag="VerseKey::LowerBound"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey &amp; VerseKey::LowerBound </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
gets the lower boundary of this VerseKey.
<p>
<dl compact><dt><b>
Returns: </b><dd>
the lower boundary of this VerseKey </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00761">761</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01316">Index</a>(), <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>(), <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>(), and <a class="el" href="versekey_8cpp-source.html#l00111">VerseKey</a>().
<p>
<div class="fragment"><pre>00762 {
00763         <font class="keywordflow">if</font> (!lowerBound) 
00764                 initBounds();
00765 
00766         <font class="keywordflow">return</font> (*lowerBound);
00767 }
</pre></div>    </td>
  </tr>
</table>
<a name="a5" doxytag="VerseKey::LowerBound"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey &amp; VerseKey::LowerBound </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>lb</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
sets the lower boundary for this VerseKey and returns the new boundary.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>lb</em>&nbsp;</td><td>
the new lower boundary for this VerseKey </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the lower boundary the key was set to </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00705">705</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>00706 {
00707         <font class="keywordflow">if</font> (!lowerBound) 
00708                 initBounds();
00709 
00710         (*lowerBound) = lb;
00711         lowerBound-&gt;<a class="code" href="class_verse_key.html#a30">Normalize</a>();
00712 
00713         <font class="keywordflow">return</font> (*lowerBound);
00714 }
</pre></div>    </td>
  </tr>
</table>
<a name="a30" doxytag="VerseKey::Normalize"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void VerseKey::Normalize </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>autocheck</em> = 0          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
checks limits and normalizes if necessary (e.g.
<p>
Matthew 29:47 = Mark 2:2). If last verse is exceeded, key is set to last Book CH:VS
<p>
<dl compact><dt><b>
Returns: </b><dd>
*this </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00963">963</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>(), <a class="el" href="versekey_8h-source.html#l00121">autonorm</a>, <a class="el" href="versekey_8h-source.html#l00124">headings</a>, <a class="el" href="versekey_8cpp-source.html#l00761">LowerBound</a>(), <a class="el" href="versekey_8h-source.html#l00115">testament</a>, and <a class="el" href="versekey_8cpp-source.html#l00774">UpperBound</a>().
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01203">AutoNormalize</a>(), <a class="el" href="versekey_8cpp-source.html#l01137">Book</a>(), <a class="el" href="versekey_8cpp-source.html#l01159">Chapter</a>(), <a class="el" href="versekey_8cpp-source.html#l01226">Headings</a>(), <a class="el" href="versekey_8cpp-source.html#l00705">LowerBound</a>(), <a class="el" href="versekey_8cpp-source.html#l00231">parse</a>(), <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>(), <a class="el" href="versekey_8cpp-source.html#l01115">Testament</a>(), <a class="el" href="versekey_8cpp-source.html#l00721">UpperBound</a>(), and <a class="el" href="versekey_8cpp-source.html#l01181">Verse</a>().
<p>
<div class="fragment"><pre>00964 {
00965         error = 0;
00966 
00967         <font class="keywordflow">if</font> ((autocheck) &amp;&amp; (!<a class="code" href="class_verse_key.html#o8">autonorm</a>)) <font class="comment">// only normalize if we were explicitely called or if autonorm is turned on</font>
00968                 <font class="keywordflow">return</font>;
00969 
00970         <font class="keywordflow">if</font> ((headings) &amp;&amp; (!verse))             <font class="comment">// this is cheeze and temporary until deciding what actions should be taken.</font>
00971                 <font class="keywordflow">return</font>;                                 <font class="comment">// so headings should only be turned on when positioning with Index() or incrementors</font>
00972 
00973         <font class="keywordflow">while</font> ((testament &lt; 3) &amp;&amp; (testament &gt; 0)) {
00974 
00975                 <font class="keywordflow">if</font> (book &gt; BMAX[<a class="code" href="class_verse_key.html#o4">testament</a>-1]) {
00976                         book -= BMAX[<a class="code" href="class_verse_key.html#o4">testament</a>-1];
00977                         <a class="code" href="class_verse_key.html#o4">testament</a>++;
00978                         <font class="keywordflow">continue</font>;
00979                 }
00980 
00981                 <font class="keywordflow">if</font> (book &lt; 1) {
00982                         <font class="keywordflow">if</font> (--<a class="code" href="class_verse_key.html#o4">testament</a> &gt; 0) {
00983                                 book += BMAX[<a class="code" href="class_verse_key.html#o4">testament</a>-1];
00984                         }
00985                         <font class="keywordflow">continue</font>;
00986                 }
00987 
00988                 <font class="keywordflow">if</font> (chapter &gt; books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].chapmax) {
00989                         chapter -= books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].chapmax;
00990                         book++;
00991                         <font class="keywordflow">continue</font>;
00992                 }
00993 
00994                 <font class="keywordflow">if</font> (chapter &lt; 1) {
00995                         <font class="keywordflow">if</font> (--book &gt; 0) {
00996                                 chapter += books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].chapmax;
00997                         }
00998                         <font class="keywordflow">else</font>    {
00999                                 <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#o4">testament</a> &gt; 1) {
01000                                         chapter += books[0][BMAX[0]-1].chapmax;
01001                                 }
01002                         }
01003                         <font class="keywordflow">continue</font>;
01004                 }
01005 
01006                 <font class="keywordflow">if</font> (verse &gt; books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter-1]) { <font class="comment">// -1 because e.g chapter 1 of Matthew is books[1][0].versemax[0]</font>
01007                         verse -= books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter++ - 1];
01008                         <font class="keywordflow">continue</font>;
01009                 }
01010 
01011                 <font class="keywordflow">if</font> (verse &lt; 1) {
01012                         <font class="keywordflow">if</font> (--chapter &gt; 0) {
01013                                 verse += books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter-1];
01014                         }
01015                         <font class="keywordflow">else</font>    {
01016                                 <font class="keywordflow">if</font> (book &gt; 1) {
01017                                         verse += books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-2].versemax[books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-2].chapmax-1];
01018                                 }
01019                                 <font class="keywordflow">else</font>    {
01020                                         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#o4">testament</a> &gt; 1) {
01021                                                 verse += books[0][BMAX[0]-1].versemax[books[0][BMAX[0]-1].chapmax-1];
01022                                         }
01023                                 }
01024                         }
01025                         <font class="keywordflow">continue</font>;
01026                 }
01027 
01028                 <font class="keywordflow">break</font>;  <font class="comment">// If we've made it this far (all failure checks continue) we're ok</font>
01029         }
01030 
01031         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#o4">testament</a> &gt; 2) {
01032                 <a class="code" href="class_verse_key.html#o4">testament</a> = 2;
01033                 book      = BMAX[<a class="code" href="class_verse_key.html#o4">testament</a>-1];
01034                 chapter   = books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].chapmax;
01035                 verse     = books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter-1];
01036                 error     = KEYERR_OUTOFBOUNDS;
01037         }
01038 
01039         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#o4">testament</a> &lt; 1) {
01040                 error     = ((!<a class="code" href="class_verse_key.html#o9">headings</a>) || (<a class="code" href="class_verse_key.html#o4">testament</a> &lt; 0) || (book &lt; 0)) ? KEYERR_OUTOFBOUNDS : 0;
01041                 <a class="code" href="class_verse_key.html#o4">testament</a> = ((headings) ? 0 : 1);
01042                 book      = ((headings) ? 0 : 1);
01043                 chapter   = ((headings) ? 0 : 1);
01044                 verse     = ((headings) ? 0 : 1);
01045         }
01046         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#a39">_compare</a>(<a class="code" href="class_verse_key.html#a8">UpperBound</a>()) &gt; 0) {
01047                 *<font class="keyword">this</font> = <a class="code" href="class_verse_key.html#a8">UpperBound</a>();
01048                 error = KEYERR_OUTOFBOUNDS;
01049         }
01050         <font class="keywordflow">if</font> (<a class="code" href="class_verse_key.html#a39">_compare</a>(<a class="code" href="class_verse_key.html#a7">LowerBound</a>()) &lt; 0) {
01051                 *<font class="keyword">this</font> = <a class="code" href="class_verse_key.html#a7">LowerBound</a>();
01052                 error = KEYERR_OUTOFBOUNDS;
01053         }
01054 }
</pre></div>    </td>
  </tr>
</table>
<a name="a16" doxytag="VerseKey::setPosition"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void VerseKey::setPosition </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">SW_POSITION&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Positions this key.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>p</em>&nbsp;</td><td>
position </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
*this </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00884">884</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l01075">Book</a>(), <a class="el" href="versekey_8cpp-source.html#l01087">Chapter</a>(), <a class="el" href="swkey_8cpp-source.html#l00100">SWKey::Error</a>(), <a class="el" href="versekey_8cpp-source.html#l00761">LowerBound</a>(), <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>(), <a class="el" href="versekey_8cpp-source.html#l01063">Testament</a>(), <a class="el" href="versekey_8h-source.html#l00115">testament</a>, <a class="el" href="versekey_8cpp-source.html#l00774">UpperBound</a>(), and <a class="el" href="versekey_8cpp-source.html#l01099">Verse</a>().
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l00111">VerseKey</a>().
<p>
<div class="fragment"><pre>00884                                         {
00885         <font class="keywordflow">switch</font> (p) {
00886         <font class="keywordflow">case</font> POS_TOP:
00887                 <a class="code" href="class_verse_key.html#o4">testament</a> = <a class="code" href="class_verse_key.html#a7">LowerBound</a>().<a class="code" href="class_verse_key.html#a22">Testament</a>();
00888                 book      = <a class="code" href="class_verse_key.html#a7">LowerBound</a>().<a class="code" href="class_verse_key.html#a23">Book</a>();
00889                 chapter   = <a class="code" href="class_verse_key.html#a7">LowerBound</a>().<a class="code" href="class_verse_key.html#a24">Chapter</a>();
00890                 verse     = <a class="code" href="class_verse_key.html#a7">LowerBound</a>().<a class="code" href="class_verse_key.html#a25">Verse</a>();
00891                 <font class="keywordflow">break</font>;
00892         <font class="keywordflow">case</font> POS_BOTTOM:
00893                 <a class="code" href="class_verse_key.html#o4">testament</a> = <a class="code" href="class_verse_key.html#a8">UpperBound</a>().<a class="code" href="class_verse_key.html#a22">Testament</a>();
00894                 book      = <a class="code" href="class_verse_key.html#a8">UpperBound</a>().<a class="code" href="class_verse_key.html#a23">Book</a>();
00895                 chapter   = <a class="code" href="class_verse_key.html#a8">UpperBound</a>().<a class="code" href="class_verse_key.html#a24">Chapter</a>();
00896                 verse     = <a class="code" href="class_verse_key.html#a8">UpperBound</a>().<a class="code" href="class_verse_key.html#a25">Verse</a>();
00897                 <font class="keywordflow">break</font>;
00898         <font class="keywordflow">case</font> POS_MAXVERSE:
00899                 <a class="code" href="class_verse_key.html#a30">Normalize</a>();
00900                 verse     = books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].versemax[chapter-1];
00901                 <font class="keywordflow">break</font>;
00902         <font class="keywordflow">case</font> POS_MAXCHAPTER:
00903                 verse     = 1;
00904                 <a class="code" href="class_verse_key.html#a30">Normalize</a>();
00905                 chapter   = books[<a class="code" href="class_verse_key.html#o4">testament</a>-1][book-1].chapmax;
00906                 <font class="keywordflow">break</font>;
00907         } 
00908         <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
00909         <a class="code" href="class_s_w_key.html#a6">Error</a>();        <font class="comment">// clear error from normalize</font>
00910 }
</pre></div>    </td>
  </tr>
</table>
<a name="a13" doxytag="VerseKey::setText"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void VerseKey::setText </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [inline, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Equates this <a class="el" href="class_s_w_key.html">SWKey</a> to a character string.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
string to set this key to </td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a7">SWKey</a>.
<p>
Definition at line <a class="el" href="versekey_8h-source.html#l00236">236</a> of file <a class="el" href="versekey_8h-source.html">versekey.h</a>.
<p>
References <a class="el" href="swkey_8cpp-source.html#l00115">SWKey::setText</a>().
<p>
<div class="fragment"><pre>00236 { <a class="code" href="class_s_w_key.html#a7">SWKey::setText</a>(ikey); <a class="code" href="class_verse_key.html#c5">parse</a> (); }
</pre></div>    </td>
  </tr>
</table>
<a name="a26" doxytag="VerseKey::Testament"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char VerseKey::Testament </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>itestament</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets/gets testament.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>itestament</em>&nbsp;</td><td>
value which to set testament [MAXPOS(char)] - only get </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
if unchanged -&gt; value of testament, if changed -&gt; previous value of testament </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01115">1115</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>(), and <a class="el" href="versekey_8h-source.html#l00115">testament</a>.
<p>
<div class="fragment"><pre>01116 {
01117         <font class="keywordtype">char</font> retval = <a class="code" href="class_verse_key.html#o4">testament</a>;
01118 
01119         <font class="keywordflow">if</font> (itestament != MAXPOS(<font class="keywordtype">char</font>)) {
01120                 <a class="code" href="class_verse_key.html#o4">testament</a> = itestament;
01121                 <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
01122         }
01123         <font class="keywordflow">return</font> retval;
01124 }
</pre></div>    </td>
  </tr>
</table>
<a name="a22" doxytag="VerseKey::Testament"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char VerseKey::Testament </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Gets testament.
<p>
<dl compact><dt><b>
Returns: </b><dd>
value of testament </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01063">1063</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8h-source.html#l00115">testament</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>(), and <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>().
<p>
<div class="fragment"><pre>01064 {
01065         <font class="keywordflow">return</font> <a class="code" href="class_verse_key.html#o4">testament</a>;
01066 }
</pre></div>    </td>
  </tr>
</table>
<a name="a8" doxytag="VerseKey::UpperBound"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey &amp; VerseKey::UpperBound </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const</td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
gets the upper boundary of this VerseKey.
<p>
<dl compact><dt><b>
Returns: </b><dd>
the upper boundary of this VerseKey </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00774">774</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01316">Index</a>(), <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>(), <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>(), and <a class="el" href="versekey_8cpp-source.html#l00111">VerseKey</a>().
<p>
<div class="fragment"><pre>00775 {
00776         <font class="keywordflow">if</font> (!upperBound) 
00777                 initBounds();
00778 
00779         <font class="keywordflow">return</font> (*upperBound);
00780 }
</pre></div>    </td>
  </tr>
</table>
<a name="a6" doxytag="VerseKey::UpperBound"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> VerseKey &amp; VerseKey::UpperBound </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ub</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
sets the upper boundary for this VerseKey and returns the new boundary.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>lb</em>&nbsp;</td><td>
the new upper boundary for this VerseKey </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the upper boundary the key was set to </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l00721">721</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>00722 {
00723         <font class="keywordflow">if</font> (!upperBound) 
00724                 initBounds();
00725 
00726 <font class="comment">// need to set upperbound parsing to resolve to max verse/chap if not specified</font>
00727            (*upperBound) = ub;
00728         <font class="keywordflow">if</font> (*upperBound &lt; *lowerBound)
00729                 *upperBound = *lowerBound;
00730         upperBound-&gt;<a class="code" href="class_verse_key.html#a30">Normalize</a>();
00731 
00732 <font class="comment">// until we have a proper method to resolve max verse/chap use this kludge</font>
00733         <font class="keywordtype">int</font> len = strlen(ub);
00734         <font class="keywordtype">bool</font> alpha = <font class="keyword">false</font>;
00735         <font class="keywordtype">bool</font> versespec = <font class="keyword">false</font>;
00736         <font class="keywordtype">bool</font> chapspec = <font class="keyword">false</font>;
00737         <font class="keywordflow">for</font> (<font class="keywordtype">int</font> i = 0; i &lt; len; i++) {
00738                 <font class="keywordflow">if</font> (isalpha(ub[i]))
00739                         alpha = <font class="keyword">true</font>;
00740                 <font class="keywordflow">if</font> (ub[i] == <font class="charliteral">':'</font>)       <font class="comment">// if we have a : we assume verse spec</font>
00741                         versespec = <font class="keyword">true</font>;
00742                 <font class="keywordflow">if</font> ((isdigit(ub[i])) &amp;&amp; (alpha))        <font class="comment">// if digit after alpha assume chap spec</font>
00743                         chapspec = <font class="keyword">true</font>;
00744         }
00745         <font class="keywordflow">if</font> (!chapspec)
00746                 *upperBound = MAXCHAPTER;
00747         <font class="keywordflow">if</font> (!versespec)
00748                 *upperBound = MAXVERSE;
00749         
00750 
00751 <font class="comment">// -- end kludge</font>
00752 
00753         <font class="keywordflow">return</font> (*upperBound);
00754 }
</pre></div>    </td>
  </tr>
</table>
<a name="a29" doxytag="VerseKey::Verse"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::Verse </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>iverse</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets/gets verse.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>iverse</em>&nbsp;</td><td>
value which to set verse [MAXPOS(int)] - only get </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
if unchanged -&gt; value of verse, if changed -&gt; previous value of verse </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01181">1181</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
References <a class="el" href="versekey_8cpp-source.html#l00963">Normalize</a>().
<p>
<div class="fragment"><pre>01182 {
01183         <font class="keywordtype">int</font> retval = verse;
01184 
01185         verse = iverse;
01186         <a class="code" href="class_verse_key.html#a30">Normalize</a>(1);
01187 
01188         <font class="keywordflow">return</font> retval;
01189 }
</pre></div>    </td>
  </tr>
</table>
<a name="a25" doxytag="VerseKey::Verse"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int VerseKey::Verse </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap> const<code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Gets verse.
<p>
<dl compact><dt><b>
Returns: </b><dd>
value of verse </dl>
<p>
Definition at line <a class="el" href="versekey_8cpp-source.html#l01099">1099</a> of file <a class="el" href="versekey_8cpp-source.html">versekey.cpp</a>.
<p>
Referenced by <a class="el" href="versekey_8cpp-source.html#l01402">_compare</a>(), <a class="el" href="versekey_8cpp-source.html#l01159">Chapter</a>(), and <a class="el" href="versekey_8cpp-source.html#l00884">setPosition</a>().
<p>
<div class="fragment"><pre>01100 {
01101         <font class="keywordflow">return</font> verse;
01102 }
</pre></div>    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="versekey_8h-source.html">versekey.h</a><li><a class="el" href="versekey_8cpp-source.html">versekey.cpp</a></ul>
<hr><address align="right"><small>Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>