aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/comments/swcom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/comments/swcom.cpp')
-rw-r--r--src/modules/comments/swcom.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/modules/comments/swcom.cpp b/src/modules/comments/swcom.cpp
index 1feb0cf..21afd8e 100644
--- a/src/modules/comments/swcom.cpp
+++ b/src/modules/comments/swcom.cpp
@@ -28,3 +28,41 @@ SWCom::SWCom(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTex
SWCom::~SWCom()
{
}
+
+
+long SWCom::Index() const {
+ VerseKey *key = 0;
+ try {
+ key = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) {}
+ if (!key)
+ key = new VerseKey(this->key);
+
+ entryIndex = key->NewIndex();
+
+ if (key != this->key)
+ delete key;
+
+ return entryIndex;
+}
+
+long SWCom::Index(long iindex) {
+ VerseKey *key = 0;
+ try {
+ key = SWDYNAMIC_CAST(VerseKey, this->key);
+ }
+ catch ( ... ) {}
+ if (!key)
+ key = new VerseKey(this->key);
+
+ key->Testament(1);
+ key->Index(iindex);
+
+ if (key != this->key) {
+ this->key->copyFrom(*key);
+ delete key;
+ }
+
+ return Index();
+}