diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:01 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:01 -0400 |
commit | 71a39f4652cd51df814c930dd268f3c9ad2aee86 (patch) | |
tree | 5994350a603908c4e4d660bc9d72c4ec43dd648e /include/versetreekey.h | |
parent | 03134fa5f6f25d92724ce4c183f9bbe12a9e37dc (diff) |
Imported Upstream version 1.6.0+dfsg
Diffstat (limited to 'include/versetreekey.h')
-rw-r--r-- | include/versetreekey.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/versetreekey.h b/include/versetreekey.h index 574c026..ab1d108 100644 --- a/include/versetreekey.h +++ b/include/versetreekey.h @@ -36,16 +36,25 @@ SWORD_NAMESPACE_START * Class VerseKey * The SWKey implementation used for verse based modules like Bibles or commentaries. */ -class SWDLLEXPORT VerseTreeKey : public VerseKey { +class SWDLLEXPORT VerseTreeKey : public VerseKey, public TreeKey::PositionChangeListener { static SWClass classdef; TreeKey *treeKey; +// vector<struct sbook> books; + + void init(TreeKey *treeKey); + void syncVerseToTree(); + long lastGoodOffset; + +protected: + virtual int getBookAbbrev(const char *abbr); public: /** * VerseKey Constructor - initializes Instance of VerseKey * + * @param treeKey a TreeKey which will form the basis of this VerseTreeKey * @param ikey text key (will take various forms of 'BOOK CH:VS'. * See parse() for more detailed information) */ @@ -54,6 +63,7 @@ public: /** * VerseKey Constructor - initializes instance of VerseKey * + * @param treeKey a TreeKey which will form the basis of this VerseTreeKey * @param ikey base key (will take various forms of 'BOOK CH:VS'. * See parse() for more detailed information) */ @@ -62,6 +72,7 @@ public: /** VerseKey Constructor - initializes instance of VerseKey * with boundariess - see also LowerBound() * and UpperBound() + * @param treeKey a TreeKey which will form the basis of this VerseTreeKey * @param min the lower boundary of the new VerseKey * @param max the upper boundary of the new VerseKey */ @@ -74,6 +85,7 @@ public: */ VerseTreeKey(const VerseTreeKey &k); + /** VerseKey Destructor * Cleans up an instance of VerseKey */ @@ -86,15 +98,26 @@ public: virtual bool isTraversable() const { return true; } - virtual TreeKey *getTreeKey() { return treeKey; } + virtual TreeKey *getTreeKey(); + + // TreeKey::PositionChangeListener interface + virtual void positionChanged(); + bool internalPosChange; + + virtual void decrement(int steps = 1); + virtual void increment(int steps = 1); + virtual void Normalize(char autocheck = 0); + virtual void setPosition(SW_POSITION newpos); + virtual long NewIndex() const; // OPERATORS -------------------------------------------------------------------- SWKEY_OPERATORS virtual SWKey & operator = (const VerseKey & ikey) { copyFrom(ikey); return *this; } +// virtual void copyFrom(const VerseTreeKey &ikey); }; SWORD_NAMESPACE_END |