aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/swmodule.cpp
diff options
context:
space:
mode:
authordanglassey <danglassey>2002-08-14 10:47:42 +0000
committerdanglassey <danglassey>2002-08-14 10:47:42 +0000
commiteb328cd14563269c4c2df8ba4260b859f800001e (patch)
tree7d778370e8b030b695bd578fc1ccba76d03c056b /src/modules/swmodule.cpp
parent223bb0b0aa1a50e38f546af5d0e7d38cede5a09f (diff)
downloadsword-sf-cvs-eb328cd14563269c4c2df8ba4260b859f800001e.tar.gz
sync with crosswire 20020814-1047
Diffstat (limited to 'src/modules/swmodule.cpp')
-rw-r--r--src/modules/swmodule.cpp53
1 files changed, 21 insertions, 32 deletions
diff --git a/src/modules/swmodule.cpp b/src/modules/swmodule.cpp
index f37df27..b0e1002 100644
--- a/src/modules/swmodule.cpp
+++ b/src/modules/swmodule.cpp
@@ -256,20 +256,27 @@ char SWModule::Display()
/******************************************************************************
- * SWModule::SetKey - Sets a key to this module for position to a particular
- * record or set of records
+ * SWModule::getKey - Gets the key from this module that points to the position
+ * record
+ *
+ * RET: key object
+ */
+
+SWKey *SWModule::getKey() const {
+ return key;
+}
+
+
+/******************************************************************************
+ * SWModule::setKey - Sets a key to this module for position to a particular
+ * record
*
* ENT: ikey - key with which to set this module
*
* RET: error status
*/
-char SWModule::SetKey(const SWKey &ikey) {
- return SetKey(&ikey);
-}
-
-char SWModule::SetKey(const SWKey *ikey)
-{
+char SWModule::setKey(const SWKey *ikey) {
SWKey *oldKey = 0;
if (key) {
@@ -291,24 +298,6 @@ char SWModule::SetKey(const SWKey *ikey)
/******************************************************************************
- * SWModule::KeyText - Sets/gets module KeyText
- *
- * ENT: ikeytext - value which to set keytext
- * [0] - only get
- *
- * RET: pointer to keytext
- */
-
-const char *SWModule::KeyText(const char *ikeytext)
-{
- if (ikeytext)
- SetKey(ikeytext);
-
- return *key;
-}
-
-
-/******************************************************************************
* SWModule::setPosition(SW_POSITION) - Positions this modules to an entry
*
* ENT: p - position (e.g. TOP, BOTTOM)
@@ -405,7 +394,7 @@ ListKey &SWModule::Search(const char *istr, int searchType, int flags, SWKey *sc
searchkey = (scope)?scope->clone():(key->Persist())?key->clone():0;
if (searchkey) {
searchkey->Persist(1);
- SetKey(*searchkey);
+ setKey(*searchkey);
}
(*percent)(perc, percentUserData);
@@ -519,7 +508,7 @@ ListKey &SWModule::Search(const char *istr, int searchType, int flags, SWKey *sc
free(wordBuf);
}
- SetKey(*savekey);
+ setKey(*savekey);
if (!savekey->Persist())
delete savekey;
@@ -605,11 +594,11 @@ const char *SWModule::StripText(char *buf, int len)
}
else savekey = key;
- SetKey(*tmpKey);
+ setKey(*tmpKey);
retVal = RenderText();
- SetKey(*savekey);
+ setKey(*savekey);
if (!savekey->Persist())
delete savekey;
@@ -637,11 +626,11 @@ const char *SWModule::StripText(SWKey *tmpKey)
}
else savekey = key;
- SetKey(*tmpKey);
+ setKey(*tmpKey);
retVal = StripText();
- SetKey(*savekey);
+ setKey(*savekey);
if (!savekey->Persist())
delete savekey;