[cig-commits] commit: Long awaited plugin/toolbox formalisation

Mercurial hg at geodynamics.org
Mon Nov 24 11:28:56 PST 2008


changeset:   20:01c9c9687e20
user:        SteveQuenette
date:        Thu Aug 02 08:54:00 2007 +0000
files:       libglucifer/src/Init.c
description:
Long awaited plugin/toolbox formalisation
* plugins and toolboxes have their own containers
* the toolbox manager is a singleton created and deleted with the extensibility layer
* old toolbox code cleaned and fixed up (doesn't crash on exit)
* --import[]=BLAH to load toolbox BLAH
* plugin and toolbox dependency code verified
* note: very ugly context growth/swapping still occurs!

Nomenclature:
* Module: a dll that is loaded into the system. At present a module is either a plugin or toolbox  (abstract class with all the grunt work in it). Formerly PluginLoader.
* Toolbox: e.g. StgFEM, PICellerator, Underworld...  libraries of features loaded into the system. Their main purpose is to register components to the component factory, etc, such that the main building blocks exist to build models.  The Init and Finalise function is called for the respective library.
* Plugin: addons to models.  They are instantiated late.
* ModulesManager/PluginsManager/ToolboxesManager: the abstract, plugins and toolboxes container/manager.

Still to do:
* module name mangling (such that we can say --import[]=StgFEM instead of --import[]=StgFEM_Toolbox where both refer to StgFEM_Toolboxmodule.so, but have the plugin mangling still be fine)
* better use of dlerror for why modules fail to load... almost always because it could not be found OR a symbol is missing in the module (or using a plugin that needs a toolbox that isn't loaded)
* make Underworld.exe us the toolbox system
* make ExperimentalUnderworld and gLucifer not use the old plugin way of loading them (in gLucifer's case the toolbox doesn't yet exist)
* remove StgFEM and PICellerator (and fix up xmls so these work with the StGermain executable without needing commandline arguments)


diff -r 3a0aa63d14c3 -r 01c9c9687e20 libglucifer/src/Init.c
--- a/libglucifer/src/Init.c	Thu Aug 02 01:20:49 2007 +0000
+++ b/libglucifer/src/Init.c	Thu Aug 02 08:54:00 2007 +0000
@@ -39,7 +39,7 @@
 *+		Patrick Sunter
 *+		Greg Watson
 *+
-** $Id: Init.c 663 2007-02-23 01:54:59Z KathleenHumble $
+** $Id: Init.c 728 2007-08-02 08:54:00Z SteveQuenette $
 ** 
 **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
@@ -79,7 +79,7 @@ Bool glucifer_Init() {
 	Memory_Free(directory);
 
 	/* Add the plugin path to the global plugin list */
-	PluginsManager_AddDirectory( "gLucifer", LIB_DIR );
+	ModulesManager_AddDirectory( "gLucifer", LIB_DIR );
 
 	return True;
 }



More information about the CIG-COMMITS mailing list