Index: trunk/SophyaLib/BaseTools/sophyainit.cc
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 3007)
+++ trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 3016)
@@ -20,6 +20,14 @@
 #include "sversion.h"
 
+#include <iostream>
+#include <map> 
+
 // ---  Classe d'initialisation de SOPHYA, (PPersistMgr en particulier)
 int SophyaInitiator::FgInit = 0;
+// Module version number - 2.0 , Jul 2006
+#define MOD_VERS   2.0 
+
+// Pour garder la liste des modules et leurs numeros de version
+map<string, double>* ModListP = NULL;
 
 /*!
@@ -34,4 +42,5 @@
   be a sub-class of SophyaInitiator.  
 */
+
 
 SophyaInitiator::SophyaInitiator()
@@ -46,4 +55,6 @@
 
   InitFailNewHandler();
+  ModListP = new map<string, double>;
+  
 
   #ifdef xx__mac__
@@ -149,5 +160,5 @@
 
   // si var env SOPHYA_NOPRTVER definie pas de print
-  if(!getenv("SOPHYA_NOPRTVER")) Version(true);
+  if(!getenv("SOPHYA_NOPRTVER")) PrintVersion(false);
 
   int pnice;
@@ -157,4 +168,5 @@
   nice(pnice);
 
+  SophyaInitiator::RegisterModule("BaseTools", MOD_VERS);  // Module name and version number registration  
 }
 
@@ -171,7 +183,11 @@
 }
 
-double SophyaInitiator::Version(bool fgprt)
-{
-if (fgprt) {
+/*! 
+  \brief Return the SOPHYA version number. 
+  \param svers contain the complete in addition the SOPHYA tag, the compiler name 
+  and the compilation date
+*/
+double SophyaInitiator::GetVersion(string& svers)
+{
   char* compiler = 0;
   #ifdef __GNUG__
@@ -186,4 +202,10 @@
   #ifdef __KCC__
   compiler = const_cast<char *>("KCC ") ;
+  #endif
+  #ifdef __IBMCPP__
+  compiler = const_cast<char *>("IBM-xlC ") ;
+  #endif
+  #ifdef __INTEL_COMPILER
+  compiler = const_cast<char *>("Intel-icc ") ;
   #endif
   #ifdef __SGICC__
@@ -197,11 +219,48 @@
   compiler = const_cast<char *>("Codewarrior ");
   #endif
-  fprintf(stderr,"SOPHYA Version %4.1f Revision %d (%s) -- %s %s %s\n",
+
+  char buff[512];
+  sprintf(buff,"SOPHYA Version %4.1f Revision %d (%s) -- %s %s %s",
           SOPHYA_VERSION, SOPHYA_REVISION, SOPHYA_TAG,
           __DATE__, __TIME__, compiler);
-}
-return(SOPHYA_VERSION + (SOPHYA_REVISION/1000.));
-}
-
+  svers = buff;
+  
+  return(SOPHYA_VERSION + (SOPHYA_REVISION/1000.));
+}
+
+//! Print the SOPHYA version string and optionaly the list of registered modules
+void SophyaInitiator::PrintVersion(bool fglist)
+{
+  string svers;
+  GetVersion(svers);
+  cout << svers << endl;
+  if (fglist) ListModules(cout);   
+}
+
+//! Should be called by sub-classes to register module name and version 
+int SophyaInitiator::RegisterModule(const char * name, double version)
+{
+  if (ModListP == NULL) 
+    throw NullPtrError("SophyaInitiator::RegisterModule() ModListP= NULL !");
+  map<string, double>& modlist = *ModListP;
+  modlist[string(name)] = version;
+  return modlist.size();
+}
+
+//! List of registered module names and version number
+int SophyaInitiator::ListModules(ostream& os)
+{
+  if (ModListP == NULL) 
+    throw NullPtrError("SophyaInitiator::ListModules() ModListP= NULL !");
+  os << "--- SophyaInitiator::ListModules() Name / VersionNumber --- " << endl;
+  map<string, double>& modlist = *ModListP;
+  int k = 1;
+  for(map<string, double>::iterator it = modlist.begin(); it != modlist.end(); it++, k++) 
+    os << k << " : " << (*it).first << " V= " << (*it).second << endl; 
+  os << " ----------------------------------------------------------- " << endl;
+  return modlist.size();
+}
+
+//! Return the SOPHYA version number: VERS + REV/1000
 double SOPHYA::SophyaVersion()
 {
@@ -211,7 +270,7 @@
 // On met un objet initiator en statique, pour les loaders qui savent 
 // appeler le constructeur des objets statiques   Reza 08/98
-#if !defined(Darwin)
 // La presence de l'objet statique psophyainit semble poserun probleme 
 // sur MacOSX 10.2 qui se plante a l'initialisation avec les shared-libs
+// Suppression de #if !defined(Darwin) en Juil 2006
 static SophyaInitiator psophyainit;
-#endif
+
Index: trunk/SophyaLib/BaseTools/sophyainit.h
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.h	(revision 3007)
+++ trunk/SophyaLib/BaseTools/sophyainit.h	(revision 3016)
@@ -6,4 +6,5 @@
 
 #include "machdefs.h"
+#include <string>
 
 namespace SOPHYA {
@@ -21,5 +22,10 @@
   			SophyaInitiator();
   virtual		~SophyaInitiator();
-  virtual double 	Version(bool fgprt=true);
+
+  static double         GetVersion(string& svers);
+  static void           PrintVersion(bool fglist=false);
+
+  static int            RegisterModule(const char* name, double version);
+  static int            ListModules(ostream& os);
 };
 
Index: trunk/SophyaLib/BaseTools/sversion.h
===================================================================
--- trunk/SophyaLib/BaseTools/sversion.h	(revision 3007)
+++ trunk/SophyaLib/BaseTools/sversion.h	(revision 3016)
@@ -2,7 +2,7 @@
 #define SVERSION_H
 
-#define SOPHYA_VERSION   1.9
-#define SOPHYA_REVISION  33
-#define SOPHYA_TAG       "V_Mar2006"
+#define SOPHYA_VERSION   2.0
+#define SOPHYA_REVISION  0
+#define SOPHYA_TAG       "V_Jul2006"
 
 #endif
