[sword-svn] r2650 - in trunk: include src/mgr

scribe at crosswire.org scribe at crosswire.org
Mon Aug 1 06:55:41 MST 2011


Author: scribe
Date: 2011-08-01 06:55:40 -0700 (Mon, 01 Aug 2011)
New Revision: 2650

Modified:
   trunk/include/swmgr.h
   trunk/src/mgr/swmgr.cpp
Log:
Made createModule virtual to support per module handling of exceptions
renamed to follow camelCase and deprecated the old method


Modified: trunk/include/swmgr.h
===================================================================
--- trunk/include/swmgr.h	2011-07-29 18:34:07 UTC (rev 2649)
+++ trunk/include/swmgr.h	2011-08-01 13:55:40 UTC (rev 2650)
@@ -100,7 +100,8 @@
 	SWConfig *mysysconfig;
 	SWConfig *homeConfig;
 	void CreateMods(bool multiMod = false);
-	SWModule *CreateMod(const char *name, const char *driver, ConfigEntMap &section);
+	SWDEPRECATED SWModule *CreateMod(const char *name, const char *driver, ConfigEntMap &section) { return createModule(name, driver, section); }
+	virtual SWModule *createModule(const char *name, const char *driver, ConfigEntMap &section);
 	void DeleteMods();
 	char configType;		// 0 = file; 1 = directory
 	OptionFilterMap optionFilters;

Modified: trunk/src/mgr/swmgr.cpp
===================================================================
--- trunk/src/mgr/swmgr.cpp	2011-07-29 18:34:07 UTC (rev 2649)
+++ trunk/src/mgr/swmgr.cpp	2011-08-01 13:55:40 UTC (rev 2650)
@@ -829,7 +829,7 @@
 	return ret;
 }
 
-SWModule *SWMgr::CreateMod(const char *name, const char *driver, ConfigEntMap &section)
+SWModule *SWMgr::createModule(const char *name, const char *driver, ConfigEntMap &section)
 {
 	SWBuf description, datapath, misc1;
 	ConfigEntMap::iterator entry;
@@ -1197,7 +1197,7 @@
 		
 		driver = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (SWBuf)"";
 		if (driver.length()) {
-			newmod = CreateMod((*it).first, driver, section);
+			newmod = createModule((*it).first, driver, section);
 			if (newmod) {
 				// Filters to add for this module and globally announce as an option to the user
 				// e.g. translit, strongs, redletterwords, etc, so users can turn these on and off globally




More information about the sword-cvs mailing list