[sword-svn] r3777 - trunk/include
scribe at crosswire.org
scribe at crosswire.org
Sat Aug 15 07:53:33 EDT 2020
Author: scribe
Date: 2020-08-15 07:53:33 -0400 (Sat, 15 Aug 2020)
New Revision: 3777
Modified:
trunk/include/swmodule.h
Log:
Added helper method to more easily set the keytext of the SWKey currently associated with the SWModule
Modified: trunk/include/swmodule.h
===================================================================
--- trunk/include/swmodule.h 2020-08-15 11:49:10 UTC (rev 3776)
+++ trunk/include/swmodule.h 2020-08-15 11:53:33 UTC (rev 3777)
@@ -232,11 +232,21 @@
virtual char setKey(const SWKey *ikey);
/**
+ * Sets this module's key to provided keyText without disturbing any settings on the a key itself
+ * This is simply a shortcut for the common module->getKey()->setText(keyText);
+ *
+ * @param ikey key with which to set this module
+ * @return error status
+ */
+ inline char setKeyText(const char *keyText) { getKey()->setText(keyText); return key->getError(); }
+
+ /**
* Sets a key to this module for position to a particular record
* @param ikey The SWKey which should be used as new key.
* @return Error status
*/
char setKey(const SWKey &ikey) { return setKey(&ikey); }
+
/**
* @deprecated Use setKey() instead.
*/
More information about the sword-cvs
mailing list