[sword-svn] r2690 - in trunk: include src/keys src/modules

scribe at crosswire.org scribe at crosswire.org
Tue Mar 6 14:42:11 MST 2012


Author: scribe
Date: 2012-03-06 14:42:11 -0700 (Tue, 06 Mar 2012)
New Revision: 2690

Modified:
   trunk/include/swmodule.h
   trunk/src/keys/versekey.cpp
   trunk/src/modules/swmodule.cpp
Log:
added more standard names for a few common properties
added more comments were the verse translation between v11n systems should go


Modified: trunk/include/swmodule.h
===================================================================
--- trunk/include/swmodule.h	2012-03-05 02:49:22 UTC (rev 2689)
+++ trunk/include/swmodule.h	2012-03-06 21:42:11 UTC (rev 2690)
@@ -279,40 +279,46 @@
 	 *
 	 * @return pointer to modname
 	 */
-	virtual char *Name() const;
+	char *Name() const { return getName(); }
+	virtual char *getName() const;
 
 	/** Sets module name
 	 *
 	 * @param imodname Value which to set modname; [0]-only get
 	 * @return pointer to modname
 	 */
-	virtual char *Name(const char *imodname);
+	char *Name(const char *imodname) { setName(imodname); return getName(); }
+	virtual void setName(const char *imodname);
 
 	/** Gets module description
 	 *
 	 * @return pointer to moddesc
 	 */
-	virtual char *Description() const;
+	char *Description() const { return getDescription(); }
+	virtual char *getDescription() const;
 
 	/** Sets module description
 	 *
 	 * @param imoddesc Value which to set moddesc; [0]-only get
 	 * @return pointer to moddesc
 	 */
-	virtual char *Description(const char *imoddesc);
+	char *Description(const char *imoddesc) { setDescription(imoddesc); return getDescription(); }
+	virtual void setDescription(const char *imoddesc);
 
 	/** Gets module type
 	 *
 	 * @return pointer to modtype
 	 */
-	virtual char *Type() const;
+	char *Type() const { return getType(); }
+	virtual char *getType() const;
 
 	/** Sets module type
 	 *
 	 * @param imodtype Value which to set modtype; [0]-only get
 	 * @return pointer to modtype
 	 */
-	virtual char *Type(const char *imodtype);
+	char *Type(const char *imodtype) { setType(imodtype); return getType(); }
+	virtual void setType(const char *imodtype);
 
 	/** Sets/gets module direction
 	 *
@@ -650,8 +656,8 @@
 	 */
 	virtual bool getSkipConsecutiveLinks() { return skipConsecutiveLinks; }
 	
-	virtual bool isLinked(const SWKey *k1, const SWKey *k2) const { return false; }
-	virtual bool hasEntry(const SWKey *k) const { return false; }
+	virtual bool isLinked(const SWKey *, const SWKey *) const { return false; }
+	virtual bool hasEntry(const SWKey *) const { return false; }
 
 	/** Entry Attributes are special data pertaining to the current entry.
 	 *	To see what Entry Attributes exists for a specific entry of a module,

Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp	2012-03-05 02:49:22 UTC (rev 2689)
+++ trunk/src/keys/versekey.cpp	2012-03-06 21:42:11 UTC (rev 2690)
@@ -126,9 +126,13 @@
 		verse = ikey.Verse();
 		suffix = ikey.getSuffix();
         }
+	// TODO: versification mapping
         // Here is where we will do v11n system conversions in the future
-        // when we have a conversion mechanism (Ben Morgan has started
-        // thinking about this)
+        // when we have a conversion mechanism
+        // Ben Morgan has started thinking about this
+        // Konstantin Maslyuk <kalemas at mail.ru> has submitted a patch)
+        // Asked Konstantin to try his patch out with his favorite
+        // SWORD frontend and report back how it goes.  Need to follow up
         else {
 	        // For now, this is the best we can do
         	setText(ikey.getText());

Modified: trunk/src/modules/swmodule.cpp
===================================================================
--- trunk/src/modules/swmodule.cpp	2012-03-05 02:49:22 UTC (rev 2689)
+++ trunk/src/modules/swmodule.cpp	2012-03-06 21:42:11 UTC (rev 2690)
@@ -174,11 +174,11 @@
  * RET:	pointer to modname
  */
 
-char *SWModule::Name(const char *imodname) {
-	return stdstr(&modname, imodname);
+void SWModule::setName(const char *imodname) {
+	stdstr(&modname, imodname);
 }
 
-char *SWModule::Name() const {
+char *SWModule::getName() const {
 	return modname;
 }
 
@@ -192,11 +192,11 @@
  * RET:	pointer to moddesc
  */
 
-char *SWModule::Description(const char *imoddesc) {
-	return stdstr(&moddesc, imoddesc);
+void SWModule::setDescription(const char *imoddesc) {
+	stdstr(&moddesc, imoddesc);
 }
 
-char *SWModule::Description() const {
+char *SWModule::getDescription() const {
 	return moddesc;
 }
 
@@ -210,11 +210,11 @@
  * RET:	pointer to modtype
  */
 
-char *SWModule::Type(const char *imodtype) {
-	return stdstr(&modtype, imodtype);
+void SWModule::setType(const char *imodtype) {
+	stdstr(&modtype, imodtype);
 }
 
-char *SWModule::Type() const {
+char *SWModule::getType() const {
 	return modtype;
 }
 




More information about the sword-cvs mailing list