summaryrefslogtreecommitdiff
path: root/include/versekey.h
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:49 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:49 -0400
commit8c8aa6b07e595cfac56838b5964ab3e96051f1b2 (patch)
treeda38e2c1979148dbd3b0c7b87f930746f5ba7f44 /include/versekey.h
parent8d3fc864d094eeadc721f8e93436b37a5fab173e (diff)
Imported Upstream version 1.5.7
Diffstat (limited to 'include/versekey.h')
-rw-r--r--include/versekey.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/include/versekey.h b/include/versekey.h
index 1d554d3..1cc5bf2 100644
--- a/include/versekey.h
+++ b/include/versekey.h
@@ -1,7 +1,7 @@
/******************************************************************************
* versekey.h - code for class 'versekey'- a standard Biblical verse key
*
- * $Id: versekey.h,v 1.24 2002/03/22 05:26:34 scribe Exp $
+ * $Id: versekey.h,v 1.30 2003/08/13 05:27:02 scribe Exp $
*
* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -30,6 +30,8 @@
#include <defs.h>
+SWORD_NAMESPACE_START
+
#define POS_MAXVERSE ((char)3)
#define POS_MAXCHAPTER ((char)4)
#define POS_MAXBOOK ((char)5)
@@ -69,24 +71,20 @@ class SWLocale;
* Class VerseKey
* The SWKey implementation used for verse based modules like Bibles or commentaries.
*/
-class SWDLLEXPORT VerseKey:public SWKey
-{
- class LocaleCache
- {
+class SWDLLEXPORT VerseKey:public SWKey {
+ class LocaleCache {
public:
char *name;
unsigned int abbrevsCnt;
SWLocale *locale;
- LocaleCache()
- {
+ LocaleCache() {
name = 0;
abbrevsCnt = 0;
locale = 0;
}
- virtual ~LocaleCache()
- {
+ virtual ~LocaleCache() {
if (name)
- delete[]name;
+ delete[]name;
}
};
@@ -162,7 +160,7 @@ public:
* VerseKey Constructor - initializes Instance of VerseKey
*
* @param ikey text key (will take various forms of 'BOOK CH:VS'.
- * See @ref #parse for more detailed information)
+ * See parse() for more detailed information)
*/
VerseKey(const char *ikey = 0);
@@ -170,13 +168,13 @@ public:
* VerseKey Constructor - initializes instance of VerseKey
*
* @param ikey base key (will take various forms of 'BOOK CH:VS'.
- * See @ref #parse for more detailed information)
+ * See parse() for more detailed information)
*/
VerseKey(const SWKey * ikey);
/** VerseKey Constructor - initializes instance of VerseKey
- * with boundariess - see also @ref #LowerBound
- * and @ref #UpperBound
+ * with boundariess - see also LowerBound()
+ * and UpperBound()
* @param min the lower boundary of the new VerseKey
* @param max the upper boundary of the new VerseKey
*/
@@ -204,7 +202,7 @@ public:
/** sets the upper boundary for this VerseKey
* and returns the new boundary
- * @param lb the new upper boundary for this VerseKey
+ * @param ub the new upper boundary for this VerseKey
* @return the upper boundary the key was set to
*/
VerseKey & UpperBound(const char *ub);
@@ -242,24 +240,24 @@ public:
/** Positions this key
*
- * @param p position
+ * @param newpos Position to set to.
* @return *this
*/
- virtual void setPosition(SW_POSITION);
+ virtual void setPosition(SW_POSITION newpos);
/** Decrements key a number of verses
*
- * @param decrement Number of verses to jump backward
+ * @param steps Number of verses to jump backward
* @return *this
*/
- virtual void decrement(int step);
+ virtual void decrement(int steps);
/** Increments key a number of verses
*
- * @param increment Number of verses to jump forward
+ * @param steps Number of verses to jump forward
* @return *this
*/
- virtual void increment(int step);
+ virtual void increment(int steps);
virtual char Traversable() { return 1; }
virtual const char *getBookName() const;
@@ -367,7 +365,10 @@ public:
*/
virtual long Index(long iindex);
+ virtual const char *getOSISRef() const;
+
virtual ListKey ParseVerseList(const char *buf, const char *defaultKey = "Genesis 1:1", bool expandRange = false);
+ virtual const char *getRangeText() const;
/** Compares another SWKey object
*
* @param ikey key to compare with this one
@@ -391,10 +392,15 @@ public:
virtual void setLocale(const char *name);
virtual const char *getLocale() const { return locale; }
+
+
+ // OPERATORS --------------------------------------------------------------------
+
+
SWKEY_OPERATORS
virtual SWKey & operator = (const VerseKey & ikey) { copyFrom(ikey); return *this; }
};
-
+SWORD_NAMESPACE_END
#endif