Salome HOME
PR: mergefrom_PRAS_br2_14Jan04
authorprascle <prascle>
Wed, 14 Jan 2004 16:04:02 +0000 (16:04 +0000)
committerprascle <prascle>
Wed, 14 Jan 2004 16:04:02 +0000 (16:04 +0000)
51 files changed:
bin/runSalome.py
idl/SALOMEDS_Attributes.idl
src/Container/Makefile.in
src/Container/SALOME_Container.cxx
src/DataTypeCatalog/Makefile.in
src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx
src/LifeCycleCORBA/Makefile.in
src/Loader/Makefile.in
src/Loader/SALOME_Session_Loader.cxx
src/Makefile.in
src/ModuleCatalog/Makefile.in
src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx
src/Notification/Makefile.in
src/Registry/Makefile.in
src/Registry/SALOME_Registry_Server.cxx
src/RessourcesCatalog/Makefile.in
src/RessourcesCatalog/SALOME_RessourcesCatalog_Server.cxx
src/SALOMEDS/Handle_SALOMEDS_ExternalFileDef.hxx [new file with mode: 0644]
src/SALOMEDS/Handle_SALOMEDS_FileType.hxx [new file with mode: 0644]
src/SALOMEDS/Makefile.in
src/SALOMEDS/README_attributes [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_ExternalFileDef.cdl [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_ExternalFileDef.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_ExternalFileDef.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_ExternalFileDef.ixx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_ExternalFileDef.jxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FileType.cdl [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FileType.cxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FileType.hxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FileType.ixx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_FileType.jxx [new file with mode: 0644]
src/SALOMEDS/SALOMEDS_SObject_i.cxx
src/SALOMEDS/SALOMEDS_Server.cxx
src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx
src/SALOMELocalTrace/Makefile.in [new file with mode: 0644]
src/SALOMELocalTrace/SALOME_Log.cxx [new file with mode: 0644]
src/SALOMELocalTrace/SALOME_Log.hxx [new file with mode: 0644]
src/SALOMELogger/Makefile.in [new file with mode: 0644]
src/SALOMELogger/SALOME_LoggerClient.cxx [new file with mode: 0644]
src/Session/Makefile.in
src/Session/SALOME_Session_Server.cxx
src/TOOLSDS/Makefile.in
src/TestContainer/Makefile.in
src/TestContainer/TestContainer.cxx
src/Utils/Makefile.in
src/Utils/Utils_SALOME_Exception.cxx
src/Utils/utilities.h

index d7c7a496cdfaab74b8b08f1c136b6fbb87673797..d4a702a52b8e986b797aaaf56966448d11fb2da3 100755 (executable)
@@ -255,6 +255,20 @@ add_path(os.path.join(kernel_root_dir,"bin","salome"))
 for module in liste_modules:
     module_root_dir=modules_root_dir[module]
     add_ld_library_path(os.path.join(module_root_dir,"lib","salome"))
+
+if with_logger:
+   locdir=os.environ['PWD']
+   libtracedir=os.path.join(locdir,"libSalomeTrace")
+   libtrace = os.path.join(kernel_root_dir,"lib","salome","libSALOMELoggerClient.so.0.0.0")
+   libtraceln = os.path.join(libtracedir,"libSALOMELocalTrace.so")
+   aCommand = 'rm -rf ' + libtracedir + "; "
+   aCommand += 'mkdir ' + libtracedir + "; "
+   aCommand += 'ln -s ' + libtrace + " " + libtraceln + "; "
+   aCommand += 'ln -s ' + libtrace + " " + libtraceln + ".0; "
+   aCommand += 'ln -s ' + libtrace + " " + libtraceln + ".0.0.0; "
+   os.system(aCommand)
+   add_ld_library_path(libtracedir)
+   
 #print "LD_LIBRARY_PATH=",os.environ["LD_LIBRARY_PATH"]
 
 #
@@ -376,6 +390,11 @@ def startSalome():
   import SALOME
   session=clt.waitNS("/Kernel/Session",SALOME.Session)
 
+
+  theComputer = os.getenv("HOSTNAME")
+  computerSplitName = theComputer.split('.')
+  theComputer = computerSplitName[0]
+  
   #
   # Lancement Container C++ local
   #
@@ -386,10 +405,6 @@ def startSalome():
          # Attente de la disponibilité du Container C++ local dans le Naming Service
          #
 
-         theComputer = os.getenv("HOSTNAME")
-         computerSplitName = theComputer.split('.')
-         theComputer = computerSplitName[0]
-
          clt.waitNS("/Containers/" + theComputer + "/FactoryServer")
 
   #
index b47f39beac209f742009b2c9e67837e4cb0e2ff0..fca28960a879f96105352d06cf3075534c05c830 100644 (file)
@@ -275,6 +275,46 @@ module SALOMEDS
     void   SetValue(in string value);
   };
 
+  //==========================================================================
+/*! \brief External File definition
+
+     This attribute stores a path to an External File.
+*/
+  //==========================================================================
+  interface AttributeExternalFileDef: GenericAttribute
+  {
+/*!
+    Returns the value of this attribute
+<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+*/
+    string Value();
+/*!
+   Sets the value of this attribute
+<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+*/
+    void   SetValue(in string value);
+  };
+
+  //==========================================================================
+/*! \brief File Type definition
+
+     This attribute stores an external File Type (see ExternalFileDef attribute).
+*/
+  //==========================================================================
+  interface AttributeFileType: GenericAttribute
+  {
+/*!
+    Returns the value of this attribute
+<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+*/
+    string Value();
+/*!
+   Sets the value of this attribute
+<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+*/
+    void   SetValue(in string value);
+  };
+
   //==========================================================================
   //Below the list of presentation attributes for display study tree in browser
   //==========================================================================
index fdf28da44267be9e9cade51d7049106010202b78..87f372867be63617a21151acb89a7a8d3f1cc5c9 100644 (file)
@@ -53,7 +53,7 @@ BIN_SERVER_IDL = SALOME_Component.idl
 
 CPPFLAGS+= $(PYTHON_INCLUDES)
 
-LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSalomeLoggerServer
+LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace
 
 LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS)
 
index ce8c05628e828dd287590121683474295a4cec21..77a06b9de0584040b723c7b8164e37168fb2b643 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
-using namespace std;
 #include <stdio.h>
 
-# include "Utils_ORB_INIT.hxx"
-# include "Utils_SINGLETON.hxx"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
 #include "SALOME_NamingService.hxx"
 #include "SALOME_Container_i.hxx"
 #include <iostream>
 #include <string>
 #include "utilities.h"
+using namespace std;
 
-//#define CHECKTIME
 #ifdef CHECKTIME
 #include <Utils_Timer.hxx>
 #endif
 
 #include <Python.h>
 
-static PyMethodDef MethodPyVoidMethod[] = {
-  { NULL,        NULL }
-};
+static PyMethodDef MethodPyVoidMethod[] =
+  {
+    { NULL, NULL }
+  };
 
 int main(int argc, char* argv[])
 {
   INFOS_COMPILATION;
   BEGIN_OF(argv[0])
 
-  Py_Initialize() ;
+    Py_Initialize() ;
   PySys_SetArgv( argc , argv ) ;
   Py_InitModule( "InitPyRunMethod" , MethodPyVoidMethod ) ;
 
-  try {
+  try
+    {
     
-    // Initialise the ORB.
-//     CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
-    ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-    ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
-    CORBA::ORB_var &orb = init( argc , argv ) ;
+      // Initialise the ORB.
+      ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+      ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
+      CORBA::ORB_var &orb = init( argc , argv ) ;
  
-    // Obtain a reference to the root POA.
-    // obtain the root poa manager
-    //
-    long TIMESleep = 250000000;
-    int NumberOfTries = 40;
-    int a;
-    timespec ts_req;
-    ts_req.tv_nsec=TIMESleep;
-    ts_req.tv_sec=0;
-    timespec ts_rem;
-    ts_rem.tv_nsec=0;
-    ts_rem.tv_sec=0;
-    CosNaming::NamingContext_var inc;
-    PortableServer::POA_var root_poa;
-    CORBA::Object_var theObj;
-    CORBA::Object_var obj;
-    CORBA::Object_var object;
-    SALOME_Logger::Logger_var log;
-    SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
-    int CONTAINER=0;
-    const char * Env = getenv("USE_LOGGER");
-    int EnvL =0;
-    if ((Env!=NULL) && (strlen(Env)))
-      EnvL=1;
-
-    CosNaming::Name name;
-    name.length(1);
-    name[0].id=CORBA::string_dup("Logger");    
-    PortableServer::POAManager_var pman; 
-    for (int i = 1; i<=NumberOfTries; i++){
-      if (i!=1) 
-       a=nanosleep(&ts_req,&ts_rem);
-      try{ 
-       obj = orb->resolve_initial_references("RootPOA");
-       if(!CORBA::is_nil(obj))
-         root_poa = PortableServer::POA::_narrow(obj);
-       if(!CORBA::is_nil(root_poa))
-         pman = root_poa->the_POAManager();
-       if(!CORBA::is_nil(orb)) 
-         theObj = orb->resolve_initial_references("NameService");
-       if (!CORBA::is_nil(theObj))
-         inc = CosNaming::NamingContext::_narrow(theObj);
-      }
-      catch( CORBA::COMM_FAILURE& )
+      // Obtain a reference to the root POA.
+      // obtain the root poa manager
+      //
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var root_poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
+      int CONTAINER=0;
+      const char * Env = getenv("USE_LOGGER");
+      int EnvL =0;
+      if ((Env!=NULL) && (strlen(Env)))
+       EnvL=1;
+
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id=CORBA::string_dup("Logger");    
+      PortableServer::POAManager_var pman; 
+      for (int i = 1; i<=NumberOfTries; i++)
        {
-         MESSAGE( "Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
+         if (i!=1) 
+           a=nanosleep(&ts_req,&ts_rem);
+         try
+           { 
+             obj = orb->resolve_initial_references("RootPOA");
+             if(!CORBA::is_nil(obj))
+               root_poa = PortableServer::POA::_narrow(obj);
+             if(!CORBA::is_nil(root_poa))
+               pman = root_poa->the_POAManager();
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService");
+             if (!CORBA::is_nil(theObj))
+               inc = CosNaming::NamingContext::_narrow(theObj);
+           }
+         catch( CORBA::COMM_FAILURE& )
+           {
+             MESSAGE( "Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
            }
-      if(!CORBA::is_nil(inc)) {
-       MESSAGE( "Container: Naming Service was found" )
-         if(EnvL==1){
-           for(int j=1; j<=NumberOfTries; j++){
-             if (j!=1) 
-               a=nanosleep(&ts_req, &ts_rem);
-             try{
-                   object = inc->resolve(name);
-                 }
-                 catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Container: Logger Server wasn't found" ) }
-                 catch(...){ MESSAGE( "Container: Unknown exception" ) }
-                 if (!CORBA::is_nil(object))
-                   log = SALOME_Logger::Logger::_narrow(object);
-                 if (!CORBA::is_nil(log)){
-                   MESSAGE( "Container: Logger Server was found" )
-                     log->ping();
-                    CONTAINER=1;
-                   break;
-                 }
-               }}
-         }
-      if ((CONTAINER==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
+         if(!CORBA::is_nil(inc)) 
+           {
+             MESSAGE( "Container: Naming Service was found" );
+             if(EnvL==1)
+               {
+                 for(int j=1; j<=NumberOfTries; j++)
+                   {
+                     if (j!=1) 
+                       a=nanosleep(&ts_req, &ts_rem);
+                     try
+                       {
+                         object = inc->resolve(name);
+                       }
+                     catch(CosNaming::NamingContext::NotFound)
+                       {
+                         MESSAGE( "Container: Logger Server wasn't found" );
+                       }
+                     catch(...)
+                       {
+                         MESSAGE( "Container: Unknown exception" );
+                       }
+                     if (!CORBA::is_nil(object))
+                       {
+                         MESSAGE( "Container: Logger Server was found" );
+                         CONTAINER=1;
+                         break;
+                       }
+                   }
+               }
+           }
+         if ((CONTAINER==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
             break;
-             }    
+       }    
 
-     // 
-    // define policy objects     
-    PortableServer::ImplicitActivationPolicy_var implicitActivation =
-      root_poa->create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION) ;
+      // define policy objects     
+      PortableServer::ImplicitActivationPolicy_var implicitActivation =
+       root_poa->create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION) ;
 
-    // default = NO_IMPLICIT_ACTIVATION
-    PortableServer::ThreadPolicy_var threadPolicy =
-      root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL) ;
-    // default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL
+      // default = NO_IMPLICIT_ACTIVATION
+      PortableServer::ThreadPolicy_var threadPolicy =
+       root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL) ;
+      // default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL
     
-    // create policy list
-    CORBA::PolicyList policyList;
-    policyList.length(2);
-    policyList[0] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitActivation) ;
-    policyList[1] = PortableServer::ThreadPolicy::_duplicate(threadPolicy) ;
-
-    // create the child POA
-    PortableServer::POAManager_var nil_mgr = PortableServer::POAManager::_nil() ;
-    PortableServer::POA_var factory_poa =
-      root_poa->create_POA("factory_poa", pman, policyList) ;
+      // create policy list
+      CORBA::PolicyList policyList;
+      policyList.length(2);
+      policyList[0] = PortableServer::ImplicitActivationPolicy::_duplicate(implicitActivation) ;
+      policyList[1] = PortableServer::ThreadPolicy::_duplicate(threadPolicy) ;
+
+      // create the child POA
+      PortableServer::POAManager_var nil_mgr = PortableServer::POAManager::_nil() ;
+      PortableServer::POA_var factory_poa =
+       root_poa->create_POA("factory_poa", pman, policyList) ;
       //with nil_mgr instead of pman, a new POA manager is created with the new POA
     
-    // destroy policy objects
-    implicitActivation->destroy() ;
-    threadPolicy->destroy() ;
+      // destroy policy objects
+      implicitActivation->destroy() ;
+      threadPolicy->destroy() ;
 
-    char *containerName = "";
-    if (argc >1) 
-    {
-       containerName = argv[1] ;
-    }
+      char *containerName = "";
+      if (argc >1) 
+       {
+         containerName = argv[1] ;
+       }
     
-    Engines_Container_i * myContainer 
-     = new Engines_Container_i(orb, factory_poa, containerName , argc , argv );
+      Engines_Container_i * myContainer 
+       = new Engines_Container_i(orb, factory_poa, containerName , argc , argv );
 
-//     Engines_Container_i * myContainer 
-//      = new Engines_Container_i(string(argv[1]),string(argv[2]), orb, factory_poa);
+      //     Engines_Container_i * myContainer 
+      //      = new Engines_Container_i(string(argv[1]),string(argv[2]), orb, factory_poa);
 
-    // use naming service
-//     myContainer->_NS.init_orb(orb);
-//     Engines::Container_ptr pCont = Engines::Container::_narrow(myContainer->_this());
-//     myContainer->_NS.Register(pCont, argv[2]); 
+      // use naming service
+      //     myContainer->_NS.init_orb(orb);
+      //     Engines::Container_ptr pCont = Engines::Container::_narrow(myContainer->_this());
+      //     myContainer->_NS.Register(pCont, argv[2]); 
     
-    pman->activate();
+      pman->activate();
 
 #ifdef CHECKTIME
-    Utils_Timer timer;
-    timer.Start();
-    timer.Stop();
-    MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
-    timer.ShowAbsolute();
+      Utils_Timer timer;
+      timer.Start();
+      timer.Stop();
+      MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
+      timer.ShowAbsolute();
 #endif
-    orb->run();
+      orb->run();
 
-    orb->destroy();
-  }
+      orb->destroy();
+    }
   catch(CORBA::SystemException&)
-  {
-    INFOS("Caught CORBA::SystemException.")
-  }
+    {
+      INFOS("Caught CORBA::SystemException.")
+       }
   catch(PortableServer::POA::WrongPolicy&)
-  {
-    INFOS("Caught CORBA::WrongPolicyException.")
-  }
+    {
+      INFOS("Caught CORBA::WrongPolicyException.")
+       }
   catch(PortableServer::POA::ServantAlreadyActive&)
-  {
-    INFOS("Caught CORBA::ServantAlreadyActiveException")
-  }
+    {
+      INFOS("Caught CORBA::ServantAlreadyActiveException")
+       }
   catch(CORBA::Exception&)
-  {
-    INFOS("Caught CORBA::Exception.")
-  }
+    {
+      INFOS("Caught CORBA::Exception.")
+       }
   catch(...)
-  {
-    INFOS("Caught unknown exception.")
-  }
+    {
+      INFOS("Caught unknown exception.")
+       }
   END_OF(argv[0]);
 }
 
index 1017cafe0952b510b808995817f5baa4038b8c9e..5759b3b468fbadaf55f86727ca6a22041b0c1df4 100644 (file)
@@ -54,6 +54,6 @@ BIN_SERVER_IDL = SALOME_DataTypeCatalog.idl
 
 CPPFLAGS+= $(QT_MT_INCLUDES) 
 CXXFLAGS+= 
-LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSalomeLoggerServer
+LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
 
 @CONCLUDE@
index 95c4ce6a1fb1e47842998e0ce8e1a79de28d1fbf..a29401c51644720df8528bf20b2c7be0343efd8e 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <iostream.h>
 #include "SALOME_NamingService.hxx"
 #include "SALOME_DataTypeCatalog_impl.hxx"
 #include "utilities.h"
-# include "Utils_SINGLETON.hxx"
+#include "Utils_SINGLETON.hxx"
+using namespace std;
+
 int main(int argc,char **argv)
 {
-  try {
-  CosNaming::NamingContext_var _rootContext, catalogContext;
-  // initialize the ORB
-  CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
-  // initialize POA
-  //
-  long TIMESleep = 250000000;
-  int NumberOfTries = 40;
-  int a;
-  timespec ts_req;
-  ts_req.tv_nsec=TIMESleep;
-  ts_req.tv_sec=0;
-  timespec ts_rem;
-  ts_rem.tv_nsec=0;
-  ts_rem.tv_sec=0;
-  CosNaming::NamingContext_var inc;
-  PortableServer::POA_var poa;
-  CORBA::Object_var theObj;
-  CORBA::Object_var obj;
-  CORBA::Object_var object;
-  SALOME_Logger::Logger_var log;
-  int DATA_TYPE_CATALOG=0;
-  const char * Env = getenv("USE_LOGGER"); 
-  int EnvL =0;
-  if ((Env!=NULL) && (strlen(Env)))
-    EnvL=1;  
-  CosNaming::Name name;
-  name.length(1);
-  name[0].id=CORBA::string_dup("Logger");    
-  PortableServer::POAManager_var mgr; 
+  try 
+    {
+      CosNaming::NamingContext_var _rootContext, catalogContext;
+      // initialize the ORB
+      CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
+      // initialize POA
+      //
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      int DATA_TYPE_CATALOG=0;
+      const char * Env = getenv("USE_LOGGER"); 
+      int EnvL =0;
+      if ((Env!=NULL) && (strlen(Env)))
+       EnvL=1;  
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id=CORBA::string_dup("Logger");    
+      PortableServer::POAManager_var mgr; 
  
-  for (int i = 1; i<=NumberOfTries; i++){
-    if (i!=1) 
-      a=nanosleep(&ts_req,&ts_rem);
-    try{ 
-      obj = orb->resolve_initial_references("RootPOA");
-      if(!CORBA::is_nil(obj))
-       poa = PortableServer::POA::_narrow(obj);
-      if(!CORBA::is_nil(poa))
-       mgr = poa->the_POAManager();
-      if(!CORBA::is_nil(orb)) 
-       theObj = orb->resolve_initial_references("NameService");
-      if (!CORBA::is_nil(theObj))
-       inc = CosNaming::NamingContext::_narrow(theObj);}
-    catch( CORBA::COMM_FAILURE& )
-      {
-       MESSAGE( "Data Type Catalog: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
-         }
-    if(!CORBA::is_nil(inc)) {
-      MESSAGE( "Data Type Catalog: Naming Service was found" )
-       if(EnvL==1){
-         CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
-         SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
-         NS.init_orb( orb1 ) ;
-         for(int j=1; j<=NumberOfTries; j++){
-           if (j!=1) 
-                 a=nanosleep(&ts_req, &ts_rem);
-           try{
-             object = inc->resolve(name);}
-           catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Data Type Catalog: Logger Server wasn't found" ) }
-           catch(...){ MESSAGE( "Data Type Catalog: Unknown exception" ) }
-           if (!CORBA::is_nil(object))
-             log = SALOME_Logger::Logger::_narrow(object);
-           if (!CORBA::is_nil(log)){
-             MESSAGE( "Data Type Catalog: Logger Server was found" )
-               log->ping();
-             DATA_TYPE_CATALOG=1;
-                 break;
+      for (int i = 1; i<=NumberOfTries; i++)
+       {
+         if (i!=1) 
+           a=nanosleep(&ts_req,&ts_rem);
+         try
+           { 
+             obj = orb->resolve_initial_references("RootPOA");
+             if(!CORBA::is_nil(obj))
+               poa = PortableServer::POA::_narrow(obj);
+             if(!CORBA::is_nil(poa))
+               mgr = poa->the_POAManager();
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService");
+             if (!CORBA::is_nil(theObj))
+               inc = CosNaming::NamingContext::_narrow(theObj);}
+         catch( CORBA::COMM_FAILURE& )
+           {
+             MESSAGE( "Data Type Catalog: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
            }
+         if(!CORBA::is_nil(inc))
+           {
+             MESSAGE( "Data Type Catalog: Naming Service was found" );
+             if(EnvL==1)
+               {
+                 CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
+                 SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
+                 NS.init_orb( orb1 ) ;
+                 for(int j=1; j<=NumberOfTries; j++)
+                   {
+                     if (j!=1) 
+                       a=nanosleep(&ts_req, &ts_rem);
+                     try
+                       {
+                         object = inc->resolve(name);
+                       }
+                     catch(CosNaming::NamingContext::NotFound)
+                       {
+                         MESSAGE( "Data Type Catalog: Logger Server wasn't found" );
+                       }
+                     catch(...)
+                       {
+                         MESSAGE( "Data Type Catalog: Unknown exception" );
+                       }
+                     if (!CORBA::is_nil(object))
+                       {
+                         MESSAGE( "Data Type Catalog: Logger Server was found" );
+                         DATA_TYPE_CATALOG=1;
+                         break;
+                       }
            
-         }}
-    }
-    if ((DATA_TYPE_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
-      break;
+                   }
+               }
            }
+         if ((DATA_TYPE_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
+           break;
+       }
 
-  //
-  // Active catalog
+      // Active catalog
 
-  SALOME_DataTypeCatalogImpl* Catalogue_i = new SALOME_DataTypeCatalogImpl(argc, argv);
-  poa->activate_object (Catalogue_i);
+      SALOME_DataTypeCatalogImpl* Catalogue_i = new SALOME_DataTypeCatalogImpl(argc, argv);
+      poa->activate_object (Catalogue_i);
 
-  mgr->activate();
+      mgr->activate();
 
   
-  CORBA::Object_ptr myCata = Catalogue_i->_this();
+      CORBA::Object_ptr myCata = Catalogue_i->_this();
 
-  // initialise Naming Service
-  SALOME_NamingService *_NS;
-  _NS = new SALOME_NamingService(orb);
-  // register Catalog in Naming Service
-  _NS->Register(myCata ,"/Kernel/DataTypeCatalog");
+      // initialise Naming Service
+      SALOME_NamingService *_NS;
+      _NS = new SALOME_NamingService(orb);
+      // register Catalog in Naming Service
+      _NS->Register(myCata ,"/Kernel/DataTypeCatalog");
 
-  MESSAGE("Running DataType Catalog Server.")
+      MESSAGE("Running DataType Catalog Server.")
 
-  orb->run();
+       orb->run();
  
-  poa->destroy(1,1);
+      poa->destroy(1,1);
  
- }
-    catch(CORBA::SystemException&) {
   }
+  catch(CORBA::SystemException&) {
     INFOS("Caught CORBA::SystemException.")
-  }
-    catch(CORBA::Exception&) {
+      }
+  catch(CORBA::Exception&) {
     INFOS("Caught CORBA::Exception.")
-  }
+      }
 
   return 0;
 }
index 6f4a461eaed6579e949e4e1d13a4b0aed0661e04..33ee1ac8177237a20a2c510aa58d01382ffae7be 100644 (file)
@@ -51,7 +51,7 @@ BIN_SRC =
 BIN_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl \
                 SALOME_ModuleCatalog.idl
 
-LDFLAGS += -lSalomeNS -lOpUtil -lSalomeLoggerServer
+LDFLAGS += -lSalomeNS -lOpUtil -lSALOMELocalTrace
 
 @CONCLUDE@
 
index dd736d4ed19ed08531be7d7a26bbbf177d9604f1..6caf10e2c80688243d23a00bb47eb7974dab3400 100644 (file)
@@ -31,7 +31,7 @@ BIN_CLIENT_IDL = SALOME_Session.idl \
 
 CPPFLAGS+=$(QT_MT_INCLUDES)
 CXXFLAGS+=$(OCC_CXXFLAGS)
-LDFLAGS+=$(QT_MT_LIBS) -lSalomeNS -lOpUtil -lSalomeLoggerServer
+LDFLAGS+=$(QT_MT_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
 
 
 @CONCLUDE@
index acd0ea377065ce13579130ed437deab91193e0e6..3aff0456418d235168f796e540ade4ba60ea10ce 100644 (file)
@@ -13,6 +13,7 @@ using namespace std;
 
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SALOME_Session)
+#include CORBA_CLIENT_HEADER(Logger)
 
 #include "Utils_ORB_INIT.hxx"
 #include "Utils_SINGLETON.hxx"
index ed8d2f4ec80f217e4d0cd608c41c1030591b98a7..89f82d775e3d9a0e9bf90dea4e3f4f61520ecd44 100644 (file)
@@ -32,10 +32,17 @@ VPATH=.:@srcdir@
 
 @COMMENCE@
 
-SUBDIRS = MSG2QM Logger Utils PatchQt NamingService Registry ModuleCatalog DataTypeCatalog \
-         RessourcesCatalog Notification NOTIFICATION_SWIG Container TestContainer LifeCycleCORBA \
-          HDFPersist VTKFilter OBJECT TOOLSDS SALOMEDS SALOMEGUI Plot2d VTKViewer OCCViewer SUPERVGraph \
-         Session SALOME_SWIG TOOLSGUI SALOME_PY RegistryDisplay ModuleGenerator SALOME_PYQT Loader
+SUBDIRS = MSG2QM SALOMELocalTrace Logger SALOMELogger Utils PatchQt \
+          NamingService Registry \
+         ModuleCatalog DataTypeCatalog RessourcesCatalog \
+          Notification  NOTIFICATION_SWIG \
+         Container TestContainer LifeCycleCORBA HDFPersist \
+         VTKFilter OBJECT \
+          TOOLSDS SALOMEDS \
+          SALOMEGUI Plot2d VTKViewer OCCViewer \
+         SUPERVGraph \
+         Session SALOME_SWIG TOOLSGUI SALOME_PY \
+          RegistryDisplay ModuleGenerator SALOME_PYQT Loader
 
 ifeq (@WITHMPICH@,yes)
   SUBDIRS+= MPIContainer
index c61ad84874463d3418c276153d9d539c7d312c60..97a1d981600889196840388049344006062c2f67 100644 (file)
@@ -57,6 +57,6 @@ BIN_SERVER_IDL = SALOME_ModuleCatalog.idl
 
 CPPFLAGS+= $(QT_MT_INCLUDES) 
 CXXFLAGS+= -ftemplate-depth-42
-LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lOpUtil -lSalomeLoggerServer
+LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
 
 @CONCLUDE@
index 65d7566b564438f8f731965eb6f7672a44f56c45..c206cc8463dcb7b18facf19dc7c41a7447ea5fb2 100644 (file)
 //  File   : SALOME_ModuleCatalog_Server.cxx
 //  Module : SALOME
 
-using namespace std;
 /* $Header$ */
+
 #include <iostream.h>
 #include "SALOME_NamingService.hxx"
 #include "SALOME_ModuleCatalog_impl.hxx"
 #include "utilities.h"
-# include "Utils_SINGLETON.hxx"
+#include "Utils_SINGLETON.hxx"
 
-//#define CHECKTIME
-#ifdef CHECKTIME
-#include <Utils_Timer.hxx>
-#endif
-
-//#define CHECKTIME
 #ifdef CHECKTIME
 #include <Utils_Timer.hxx>
 #endif
+using namespace std;
 
 int main(int argc,char **argv)
 {
-  try {
-  CosNaming::NamingContext_var _rootContext, catalogContext;
+  try 
+    {
+      CosNaming::NamingContext_var _rootContext, catalogContext;
 
-  // initialize the ORB
+      // initialize the ORB
 
-  CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
+      CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
 
-  // initialize POA
-  //
-   long TIMESleep = 250000000;
-   int NumberOfTries = 40;
-   int a;
-   timespec ts_req;
-   ts_req.tv_nsec=TIMESleep;
-   ts_req.tv_sec=0;
-   timespec ts_rem;
-   ts_rem.tv_nsec=0;
-   ts_rem.tv_sec=0;
-   CosNaming::NamingContext_var inc;
-   PortableServer::POA_var poa;
-   CORBA::Object_var theObj;
-   CORBA::Object_var obj;
-   CORBA::Object_var object;
-   SALOME_Logger::Logger_var log;
-   int MODULE_CATALOG=0;
-   const char * Env = getenv("USE_LOGGER");
-   int EnvL =0;
-   if ((Env!=NULL) && (strlen(Env)))
-     EnvL=1;
-   CosNaming::Name name;
-   name.length(1);
-   name[0].id=CORBA::string_dup("Logger");    
-   PortableServer::POAManager_var mgr; 
-   for (int i = 1; i<=NumberOfTries; i++){
-     if (i!=1) 
-       a=nanosleep(&ts_req,&ts_rem);
-     try{ 
-       obj = orb->resolve_initial_references("RootPOA");
-       if(!CORBA::is_nil(obj))
-        poa = PortableServer::POA::_narrow(obj);
-       if(!CORBA::is_nil(poa))
-           mgr = poa->the_POAManager();
-       if(!CORBA::is_nil(orb)) 
-        theObj = orb->resolve_initial_references("NameService"); 
-     }
-     catch( CORBA::COMM_FAILURE& )
-       {
-        MESSAGE( "Module Catalog Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
-          }
-     if (!CORBA::is_nil(theObj)){
-       inc = CosNaming::NamingContext::_narrow(theObj);
-       if(!CORBA::is_nil(inc)) {
-        MESSAGE( "Module Catalog Server: Naming Service was found" )
-        if(EnvL==1){
-          CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
-          SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
-          NS.init_orb( orb1 ) ;
-          for(int j=1; j<=NumberOfTries; j++){
-            if (j!=1) 
-              a=nanosleep(&ts_req, &ts_rem);
-            try{
-              object = inc->resolve(name);}
-            catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Logger Server wasn't found" ) }
-            catch(...){ MESSAGE( "Module Catalog Server: Unknown exception" ) }
-            if (!CORBA::is_nil(object))
-              log = SALOME_Logger::Logger::_narrow(object);
-            if (!CORBA::is_nil(log)){
-              MESSAGE( "Module Catalog Server: Logger Server was found" )
-              log->ping();
-              MODULE_CATALOG=1;
-              break;
-            }
-                }}
-       }}
-     if ((MODULE_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
-       break;
-        }
+      // initialize POA
+      //
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      int MODULE_CATALOG=0;
+      const char * Env = getenv("USE_LOGGER");
+      int EnvL =0;
+      if ((Env!=NULL) && (strlen(Env)))
+       EnvL=1;
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id=CORBA::string_dup("Logger");    
+      PortableServer::POAManager_var mgr; 
+      for (int i = 1; i<=NumberOfTries; i++)
+       {
+         if (i!=1) 
+           a=nanosleep(&ts_req,&ts_rem);
+         try
+           { 
+             obj = orb->resolve_initial_references("RootPOA");
+             if(!CORBA::is_nil(obj))
+               poa = PortableServer::POA::_narrow(obj);
+             if(!CORBA::is_nil(poa))
+               mgr = poa->the_POAManager();
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService"); 
+           }
+         catch( CORBA::COMM_FAILURE& )
+           {
+             MESSAGE( "Module Catalog Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
+           }
+         if (!CORBA::is_nil(theObj))
+           {
+             inc = CosNaming::NamingContext::_narrow(theObj);
+             if(!CORBA::is_nil(inc))
+               {
+                 MESSAGE( "Module Catalog Server: Naming Service was found" );
+                 if(EnvL==1)
+                   {
+                     CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
+                     SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
+                     NS.init_orb( orb1 ) ;
+                     for(int j=1; j<=NumberOfTries; j++)
+                       {
+                         if (j!=1) 
+                           a=nanosleep(&ts_req, &ts_rem);
+                         try{
+                           object = inc->resolve(name);}
+                         catch(CosNaming::NamingContext::NotFound)
+                           {
+                             MESSAGE( "Logger Server wasn't found" );
+                           }
+                         catch(...)
+                           {
+                             MESSAGE( "Module Catalog Server: Unknown exception" ) ;
+                           }
+                         if (!CORBA::is_nil(object))
+                           {
+                             MESSAGE( "Module Catalog Server: Logger Server was found" );
+                             MODULE_CATALOG=1;
+                             break;
+                           }
+                       }
+                   }
+               }
+           }
+         if ((MODULE_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
+           break;
+       }
   
-   //
-  // Active catalog
+      // Active catalog
 
-  SALOME_ModuleCatalogImpl* Catalogue_i = new SALOME_ModuleCatalogImpl(argc, argv);
-  poa->activate_object (Catalogue_i);
+      SALOME_ModuleCatalogImpl* Catalogue_i = new SALOME_ModuleCatalogImpl(argc, argv);
+      poa->activate_object (Catalogue_i);
 
-  mgr->activate();
+      mgr->activate();
 
   
-  CORBA::Object_ptr myCata = Catalogue_i->_this();
+      CORBA::Object_ptr myCata = Catalogue_i->_this();
 
-  // initialise Naming Service
-  SALOME_NamingService *_NS;
-  _NS = new SALOME_NamingService(orb);
-  // register Catalog in Naming Service
-  _NS->Register(myCata ,"/Kernel/ModulCatalog");
+      // initialise Naming Service
+      SALOME_NamingService *_NS;
+      _NS = new SALOME_NamingService(orb);
+      // register Catalog in Naming Service
+      _NS->Register(myCata ,"/Kernel/ModulCatalog");
 
-  MESSAGE("Running CatalogServer.");
+      MESSAGE("Running CatalogServer.");
 
 #ifdef CHECKTIME
-  Utils_Timer timer;
-  timer.Start();
-  timer.Stop();
-  MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
-  timer.ShowAbsolute();
+      Utils_Timer timer;
+      timer.Start();
+      timer.Stop();
+      MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
+      timer.ShowAbsolute();
 #endif
-  orb->run();
+      orb->run();
  
-  poa->destroy(1,1);
+      poa->destroy(1,1);
  
-  }
-    catch(CORBA::SystemException&) {
+    }
+  catch(CORBA::SystemException&) {
     INFOS("Caught CORBA::SystemException.")
-  }
-    catch(CORBA::Exception&) {
+      }
+  catch(CORBA::Exception&) {
     INFOS("Caught CORBA::Exception.")
-  }
+      }
 
   return 0;
 }
index 0da007a70e101832f8bf2e87322970ee51ca3ede..4d43c67a5f67a0b1f8041c1b916b018a4f0601f5 100644 (file)
@@ -47,7 +47,7 @@ LIB_SRC = NOTIFICATION.cxx          \
           NOTIFICATION_Supplier.cxx \
           NOTIFICATION_Consumer.cxx
 
-LDFLAGS+= -lOpUtil
+LDFLAGS+= -lOpUtil -lSALOMELocalTrace
 OMNIORB_IDLCXXFLAGS+= -Wbtp
 
 @CONCLUDE@
index 823ac6241e219eacb313fd7f320e434fa1246864..5ff83cb1d02fabe8361d6869ceac4f0f6c6653c8 100644 (file)
@@ -50,6 +50,6 @@ BIN = SALOME_Registry_Server
 BIN_SRC = RegistryService.cxx
 BIN_SERVER_IDL = SALOME_Registry.idl
 
-LDFLAGS+= -lSalomeNS -lOpUtil -lSalomeLoggerServer
+LDFLAGS+= -lSalomeNS -lOpUtil -lSALOMELocalTrace 
 
 @CONCLUDE@
index e4aee0f7d45e78ad97e6260f224cb071bab5cba0..3e5a5b636fff0472744be2aa40614c9c3e77fced 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
-# include <stdlib.h>
-# include <iostream.h>
-# include <fstream.h>
+#include <stdlib.h>
+#include <iostream.h>
+#include <fstream.h>
 
 extern "C"
 {
 # include <stdio.h>
 }
 
-# include "utilities.h"
-# include "Utils_ORB_INIT.hxx"
-# include "Utils_SINGLETON.hxx"
-# include "Utils_SALOME_Exception.hxx"
-# include "Utils_CommException.hxx"
-# include "ServiceUnreachable.hxx"
-# include "SALOME_NamingService.hxx"
-# include "RegistryService.hxx"
+#include "utilities.h"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
+#include "Utils_SALOME_Exception.hxx"
+#include "Utils_CommException.hxx"
+#include "ServiceUnreachable.hxx"
+#include "SALOME_NamingService.hxx"
+#include "RegistryService.hxx"
 
-//#define CHECKTIME
 #ifdef CHECKTIME
 #include <Utils_Timer.hxx>
 #endif
+using namespace std;
 
 int main( int argc , char **argv )
 {
-       BEGIN_OF( argv[0] )
-       INFOS_COMPILATION 
-       SCRUTE(argc) 
-       if( argc<3 )
+  BEGIN_OF( argv[0] )
+    INFOS_COMPILATION 
+    SCRUTE(argc) 
+    if( argc<3 )
+      {
+       MESSAGE("you must provide the Salome session name when you call SALOME_Registry_Server") ;
+       throw CommException("you must provide the Salome session name when you call SALOME_Registry_Server") ;
+      }
+  const char *ptrSessionName=0 ;
+
+  int k=0 ;
+  for ( k=1 ; k<argc ; k++ )
+    {
+      if( strcmp(argv[k],"--salome_session")==0 )
        {
-               MESSAGE("you must provide the Salome session name when you call SALOME_Registry_Server") ;
-               throw CommException("you must provide the Salome session name when you call SALOME_Registry_Server") ;
+         ptrSessionName=argv[k+1] ;
+         break ;
        }
-       const char *ptrSessionName=0 ;
-
-       int k=0 ;
-       for ( k=1 ; k<argc ; k++ )
+    }
+  ASSERT(ptrSessionName) ;
+  ASSERT(strlen( ptrSessionName )>0) ;
+  const char *registryName = "Registry" ;
+  ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+  CORBA::ORB_var &orb = init( argc , argv ) ;
+  //
+  long TIMESleep = 250000000;
+  int NumberOfTries = 40;
+  int a;
+  timespec ts_req;
+  ts_req.tv_nsec=TIMESleep;
+  ts_req.tv_sec=0;
+  timespec ts_rem;
+  ts_rem.tv_nsec=0;
+  ts_rem.tv_sec=0;
+  CosNaming::NamingContext_var inc;
+  PortableServer::POA_var poa;
+  CORBA::Object_var theObj;
+  CORBA::Object_var obj;
+  CORBA::Object_var object;
+  SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
+  Registry::Components_var varComponents;
+  int REGISTRY=0;
+  const char * Env = getenv("USE_LOGGER");
+  int EnvL =0;
+  if ((Env!=NULL) && (strlen(Env)))
+    EnvL=1;
+  CosNaming::Name name;
+  name.length(1);
+  name[0].id=CORBA::string_dup("Logger");  
+  PortableServer::POAManager_var manager; 
+  for (int i = 1; i<=NumberOfTries; i++)
+    {
+      if (i!=1) 
+       a=nanosleep(&ts_req,&ts_rem);
+      try
+       { 
+         obj = orb->resolve_initial_references("RootPOA");
+         if(!CORBA::is_nil(obj))
+           poa = PortableServer::POA::_narrow(obj);
+         if(!CORBA::is_nil(poa))
+           manager = poa->the_POAManager();
+         if(!CORBA::is_nil(orb)) 
+           theObj = orb->resolve_initial_references("NameService");
+         if (!CORBA::is_nil(theObj))
+           inc = CosNaming::NamingContext::_narrow(theObj);
+       }
+      catch( CORBA::COMM_FAILURE& )
        {
-               if( strcmp(argv[k],"--salome_session")==0 )
-               {
-                       ptrSessionName=argv[k+1] ;
-                       break ;
-               }
+         MESSAGE( "Registry Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
        }
-       ASSERT(ptrSessionName) ;
-       ASSERT(strlen( ptrSessionName )>0) ;
-       const char *registryName = "Registry" ;
-        ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-       CORBA::ORB_var &orb = init( argc , argv ) ;
-       //
-       long TIMESleep = 250000000;
-       int NumberOfTries = 40;
-       int a;
-       timespec ts_req;
-       ts_req.tv_nsec=TIMESleep;
-       ts_req.tv_sec=0;
-       timespec ts_rem;
-       ts_rem.tv_nsec=0;
-       ts_rem.tv_sec=0;
-       CosNaming::NamingContext_var inc;
-       PortableServer::POA_var poa;
-       CORBA::Object_var theObj;
-       CORBA::Object_var obj;
-       CORBA::Object_var object;
-       SALOME_Logger::Logger_var log;
-       SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
-       Registry::Components_var varComponents;
-       int REGISTRY=0;
-       const char * Env = getenv("USE_LOGGER");
-        int EnvL =0;
-       if ((Env!=NULL) && (strlen(Env)))
-         EnvL=1;
-       CosNaming::Name name;
-       name.length(1);
-       name[0].id=CORBA::string_dup("Logger");  
-       PortableServer::POAManager_var manager; 
-       for (int i = 1; i<=NumberOfTries; i++){
-         if (i!=1) 
-           a=nanosleep(&ts_req,&ts_rem);
-         try{ 
-           obj = orb->resolve_initial_references("RootPOA");
-           if(!CORBA::is_nil(obj))
-             poa = PortableServer::POA::_narrow(obj);
-           if(!CORBA::is_nil(poa))
-             manager = poa->the_POAManager();
-           if(!CORBA::is_nil(orb)) 
-             theObj = orb->resolve_initial_references("NameService");
-           if (!CORBA::is_nil(theObj))
-             inc = CosNaming::NamingContext::_narrow(theObj);
-           }
-         catch( CORBA::COMM_FAILURE& )
+      if(!CORBA::is_nil(inc))
+       {
+         MESSAGE( "Registry Server: Naming Service was found" );
+         if(EnvL==1)
            {
-             MESSAGE( "Registry Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
-               }
-         if(!CORBA::is_nil(inc)) {
-           MESSAGE( "Registry Server: Naming Service was found" )
-             if(EnvL==1){
-               for(int j=1; j<=NumberOfTries; j++){
+             for(int j=1; j<=NumberOfTries; j++)
+               {
                  if (j!=1) 
                    a=nanosleep(&ts_req, &ts_rem);
-                 try{
-                   object = inc->resolve(name);
-                 }
-                 catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Registry Server: Logger Server wasn't found" ) }
-                 catch(...){ MESSAGE( "Registry Server: Unknown exception" ) }
-                 
+                 try
+                   {
+                     object = inc->resolve(name);
+                   }
+                 catch(CosNaming::NamingContext::NotFound)
+                   {
+                     MESSAGE( "Registry Server: Logger Server wasn't found" );
+                   }
+                 catch(...)
+                   {
+                     MESSAGE( "Registry Server: Unknown exception" );
+                   }
                  if (!CORBA::is_nil(object))
-                   log = SALOME_Logger::Logger::_narrow(object);
-                 if (!CORBA::is_nil(log)){
-                   MESSAGE( "Registry Server: Logger Server was found" )
-                     log->ping();
-                    REGISTRY=1;
-                   break;
-                 }
-               }}
-         }
-         if ((REGISTRY==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
-            break;
-             }
-        //
-       try
-         {
-           naming.init_orb( orb ) ;
-           RegistryService *ptrRegistry = SINGLETON_<RegistryService>::Instance() ;
-           ptrRegistry->SessionName( ptrSessionName ) ;
-           varComponents = ptrRegistry->_this() ;
-           // The RegistryService must not already exist.
+                   {
+                     MESSAGE( "Module Catalog Server: Logger Server was found" );
+                     REGISTRY=1;
+                     break;
+                   }
+               }
+           }
+       }
+      if ((REGISTRY==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
+       break;
+    }
+
+  try
+    {
+      naming.init_orb( orb ) ;
+      RegistryService *ptrRegistry = SINGLETON_<RegistryService>::Instance() ;
+      ptrRegistry->SessionName( ptrSessionName ) ;
+      varComponents = ptrRegistry->_this() ;
+      // The RegistryService must not already exist.
            
-           try
-             {
-               CORBA::Object_var pipo = naming.Resolve( registryName ) ;
-               if (CORBA::is_nil(pipo) )  throw ServiceUnreachable() ;
-               MESSAGE("RegistryService servant already existing" ) ;
-               exit( EXIT_FAILURE ) ;
-             }
-           catch( const ServiceUnreachable &ex )
-             {
-             }
-           catch( const CORBA::Exception &exx )
-             {
-             }
-           string absoluteName = string("/") + registryName;
-           naming.Register( varComponents , absoluteName.c_str() ) ;
-           MESSAGE("On attend les requetes des clients") ;
-           try
-             {
-               // Activation du POA
-               MESSAGE("Activation du POA") ;
-               manager->activate() ;
+      try
+       {
+         CORBA::Object_var pipo = naming.Resolve( registryName ) ;
+         if (CORBA::is_nil(pipo) )  throw ServiceUnreachable() ;
+         MESSAGE("RegistryService servant already existing" ) ;
+         exit( EXIT_FAILURE ) ;
+       }
+      catch( const ServiceUnreachable &ex )
+       {
+       }
+      catch( const CORBA::Exception &exx )
+       {
+       }
+      string absoluteName = string("/") + registryName;
+      naming.Register( varComponents , absoluteName.c_str() ) ;
+      MESSAGE("On attend les requetes des clients") ;
+      try
+       {
+         // Activation du POA
+         MESSAGE("Activation du POA") ;
+         manager->activate() ;
                
-               // Lancement de l'ORB
-               MESSAGE("Lancement de l'ORB") ;
+         // Lancement de l'ORB
+         MESSAGE("Lancement de l'ORB") ;
 #ifdef CHECKTIME
-               Utils_Timer timer;
-               timer.Start();
-               timer.Stop();
-               MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
-               timer.ShowAbsolute();
+         Utils_Timer timer;
+         timer.Start();
+         timer.Stop();
+         MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
+         timer.ShowAbsolute();
 #endif
-               orb->run() ;
-             }
-           catch( const CORBA::Exception &ex )
-             {
-               MESSAGE("Erreur systeme") ;
-               return EXIT_FAILURE ;
-             }
+         orb->run() ;
+       }
+      catch( const CORBA::Exception &ex )
+       {
+         MESSAGE("Erreur systeme") ;
+         return EXIT_FAILURE ;
+       }
            
-         }
-       catch( const SALOME_Exception &ex )
-         {
-           MESSAGE( "Communication Error : " << ex.what() )
-             return EXIT_FAILURE ;
-         }
+    }
+  catch( const SALOME_Exception &ex )
+    {
+      MESSAGE( "Communication Error : " << ex.what() )
+       return EXIT_FAILURE ;
+    }
        
-       END_OF( argv[0] ) ;
-       return 0 ;
+  END_OF( argv[0] ) ;
+  return 0 ;
 }
index a98eab8bfade710dba804fa16784d7ed5a229db6..c129dad04db3cd5646bf7387fdaa74165438a6e6 100644 (file)
@@ -54,7 +54,7 @@ BIN_SERVER_IDL = SALOME_RessourcesCatalog.idl
 
 CPPFLAGS+= $(QT_MT_INCLUDES) 
 CXXFLAGS+= 
-LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSalomeLoggerServer
+LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
 
 @CONCLUDE@
 
index 827efd482290070a410eb27e229409b79de5bdf5..e9a16146cb778988692de3a3ced950a4e7480154 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <iostream.h>
 #include "SALOME_NamingService.hxx"
 #include "SALOME_RessourcesCatalog_impl.hxx"
 #include "utilities.h"
-# include "Utils_SINGLETON.hxx"
+#include "Utils_SINGLETON.hxx"
+using namespace std;
+
 int main(int argc,char **argv)
 {
-  try {
-  CosNaming::NamingContext_var _rootContext, catalogContext;
+  try
+    {
+      CosNaming::NamingContext_var _rootContext, catalogContext;
 
-  // initialize the ORB
+      // initialize the ORB
 
-  CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
+      CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv);
 
-  // initialize POA
-  //
-  long TIMESleep = 250000000;
-       int NumberOfTries = 40;
-       int a;
-       timespec ts_req;
-       ts_req.tv_nsec=TIMESleep;
-       ts_req.tv_sec=0;
-       timespec ts_rem;
-       ts_rem.tv_nsec=0;
-       ts_rem.tv_sec=0;
-       CosNaming::NamingContext_var inc;
-       PortableServer::POA_var poa;
-       CORBA::Object_var theObj;
-       CORBA::Object_var obj;
-       CORBA::Object_var object;
-       SALOME_Logger::Logger_var log;
-       SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
-       int RESSOURCES_CATALOG=0;
-       const char * Env = getenv("USE_LOGGER");
-        int EnvL =0;
-       if ((Env!=NULL) && (strlen(Env)))
-         EnvL=1;
-       CosNaming::Name name;
-       name.length(1);
-       name[0].id=CORBA::string_dup("Logger");    
-       PortableServer::POAManager_var mgr; 
-       for (int i = 1; i<=NumberOfTries; i++){
+      // initialize POA
+      //
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
+      int RESSOURCES_CATALOG=0;
+      const char * Env = getenv("USE_LOGGER");
+      int EnvL =0;
+      if ((Env!=NULL) && (strlen(Env)))
+       EnvL=1;
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id=CORBA::string_dup("Logger");    
+      PortableServer::POAManager_var mgr; 
+      for (int i = 1; i<=NumberOfTries; i++)
+       {
          if (i!=1) 
            a=nanosleep(&ts_req,&ts_rem);
-         try{ 
-           obj = orb->resolve_initial_references("RootPOA");
-           if(!CORBA::is_nil(obj))
-             poa = PortableServer::POA::_narrow(obj);
-           if(!CORBA::is_nil(poa))
-             mgr = poa->the_POAManager();
-           if(!CORBA::is_nil(orb)) 
-         theObj = orb->resolve_initial_references("NameService");
-           if (!CORBA::is_nil(theObj))
-             inc = CosNaming::NamingContext::_narrow(theObj);
+         try
+           { 
+             obj = orb->resolve_initial_references("RootPOA");
+             if(!CORBA::is_nil(obj))
+               poa = PortableServer::POA::_narrow(obj);
+             if(!CORBA::is_nil(poa))
+               mgr = poa->the_POAManager();
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService");
+             if (!CORBA::is_nil(theObj))
+               inc = CosNaming::NamingContext::_narrow(theObj);
            }
          catch( CORBA::COMM_FAILURE& )
            {
-             MESSAGE( "Ressources Catalog: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
+             MESSAGE( "Ressources Catalog: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
+           }
+         if(!CORBA::is_nil(inc)) 
+           {
+             MESSAGE( "Ressources Catalog: Naming Service was found" );
+             if(EnvL==1)
+               {
+                 for(int j=1; j<=NumberOfTries; j++)
+                   {
+                     if (j!=1) 
+                       a=nanosleep(&ts_req, &ts_rem);
+                     try{
+                       object = inc->resolve(name);
+                     }
+                     catch(CosNaming::NamingContext::NotFound)
+                       { 
+                         MESSAGE( "Ressources Catalog: Logger Server wasn't found" );
+                       }
+                     catch(...)
+                       { 
+                         MESSAGE( "Ressources Catalog: Unknown exception" );
+                       }
+                     if (!CORBA::is_nil(object))
+                       {
+                         MESSAGE( "Ressources Catalog: Loger Server was found" );
+                         RESSOURCES_CATALOG=1;
+                         break;
+                       }
+                   }
                }
-         if(!CORBA::is_nil(inc)) {
-           MESSAGE( "Ressources Catalog: Naming Service was found" )
-             if(EnvL==1){
-               for(int j=1; j<=NumberOfTries; j++){
-                 if (j!=1) 
-                   a=nanosleep(&ts_req, &ts_rem);
-                 try{
-                   object = inc->resolve(name);
-                 }
-                 catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Ressources Catalog: Logger Server wasn't found" ) }
-                 catch(...){ MESSAGE( "Ressources Catalog: Unknown exception" ) }
-                 if (!CORBA::is_nil(object))
-                   log = SALOME_Logger::Logger::_narrow(object);
-                 if (!CORBA::is_nil(log)){
-                   MESSAGE( "Ressources Catalog: Loger Server was found" )
-                     log->ping();
-                    RESSOURCES_CATALOG=1;
-                   break;
-                 }
-               }}
-         }
+           }
          if ((RESSOURCES_CATALOG==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
             break;
-             }
-  //
-  // Active catalog
+       }
+
+      // Active catalog
   
-  SALOME_RessourcesCatalogImpl* Catalogue_i = new SALOME_RessourcesCatalogImpl(argc, argv);
-  poa->activate_object (Catalogue_i);
-  mgr->activate();
-  CORBA::Object_ptr myCata = Catalogue_i->_this();
+      SALOME_RessourcesCatalogImpl* Catalogue_i = new SALOME_RessourcesCatalogImpl(argc, argv);
+      poa->activate_object (Catalogue_i);
+      mgr->activate();
+      CORBA::Object_ptr myCata = Catalogue_i->_this();
 
-  // initialise Naming Service
-  SALOME_NamingService *_NS;
-  _NS = new SALOME_NamingService(orb);
-  // register Catalog in Naming Service
-  _NS->Register(myCata ,"/Kernel/RessourcesCatalog");
+      // initialise Naming Service
+      SALOME_NamingService *_NS;
+      _NS = new SALOME_NamingService(orb);
+      // register Catalog in Naming Service
+      _NS->Register(myCata ,"/Kernel/RessourcesCatalog");
 
-  MESSAGE("Running Ressources Catalog Server.")
+      MESSAGE("Running Ressources Catalog Server.")
 
-  orb->run();
+       orb->run();
  
-  poa->destroy(1,1);
+      poa->destroy(1,1);
  
-  }
-    catch(CORBA::SystemException&) {
+    }
+  catch(CORBA::SystemException&) {
     INFOS("Caught CORBA::SystemException.")
-  }
-    catch(CORBA::Exception&) {
+      }
+  catch(CORBA::Exception&) {
     INFOS("Caught CORBA::Exception.")
-  }
+      }
 
   return 0;
 }
diff --git a/src/SALOMEDS/Handle_SALOMEDS_ExternalFileDef.hxx b/src/SALOMEDS/Handle_SALOMEDS_ExternalFileDef.hxx
new file mode 100644 (file)
index 0000000..124e721
--- /dev/null
@@ -0,0 +1,85 @@
+// File generated by CPPExt (Transient)
+//
+//                     Copyright (C) 1991,1995 by
+//  
+//                      MATRA DATAVISION, FRANCE
+//  
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//  
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+
+#ifndef _Handle_SALOMEDS_ExternalFileDef_HeaderFile
+#define _Handle_SALOMEDS_ExternalFileDef_HeaderFile
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+
+#ifndef _Handle_TDataStd_Comment_HeaderFile
+#include <Handle_TDataStd_Comment.hxx>
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(TDataStd_Comment);
+class SALOMEDS_ExternalFileDef;
+Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_ExternalFileDef);
+
+class Handle(SALOMEDS_ExternalFileDef) : public Handle(TDataStd_Comment) {
+  public:
+    void* operator new(size_t,void* anAddress) 
+      {
+        return anAddress;
+      }
+    void* operator new(size_t size) 
+      { 
+        return Standard::Allocate(size); 
+      }
+    void  operator delete(void *anAddress) 
+      { 
+        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
+      }
+    Handle(SALOMEDS_ExternalFileDef)():Handle(TDataStd_Comment)() {} 
+    Handle(SALOMEDS_ExternalFileDef)(const Handle(SALOMEDS_ExternalFileDef)& aHandle) : Handle(TDataStd_Comment)(aHandle) 
+     {
+     }
+
+    Handle(SALOMEDS_ExternalFileDef)(const SALOMEDS_ExternalFileDef* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem) 
+     {
+     }
+
+    Handle(SALOMEDS_ExternalFileDef)& operator=(const Handle(SALOMEDS_ExternalFileDef)& aHandle)
+     {
+      Assign(aHandle.Access());
+      return *this;
+     }
+
+    Handle(SALOMEDS_ExternalFileDef)& operator=(const SALOMEDS_ExternalFileDef* anItem)
+     {
+      Assign((Standard_Transient *)anItem);
+      return *this;
+     }
+
+    SALOMEDS_ExternalFileDef* operator->() 
+     {
+      return (SALOMEDS_ExternalFileDef *)ControlAccess();
+     }
+
+    SALOMEDS_ExternalFileDef* operator->() const 
+     {
+      return (SALOMEDS_ExternalFileDef *)ControlAccess();
+     }
+
+   Standard_EXPORT ~Handle(SALOMEDS_ExternalFileDef)();
+   Standard_EXPORT static const Handle(SALOMEDS_ExternalFileDef) DownCast(const Handle(Standard_Transient)& AnObject);
+};
+#endif
diff --git a/src/SALOMEDS/Handle_SALOMEDS_FileType.hxx b/src/SALOMEDS/Handle_SALOMEDS_FileType.hxx
new file mode 100644 (file)
index 0000000..24b684f
--- /dev/null
@@ -0,0 +1,85 @@
+// File generated by CPPExt (Transient)
+//
+//                     Copyright (C) 1991,1995 by
+//  
+//                      MATRA DATAVISION, FRANCE
+//  
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//  
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+
+#ifndef _Handle_SALOMEDS_FileType_HeaderFile
+#define _Handle_SALOMEDS_FileType_HeaderFile
+
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+
+#ifndef _Handle_TDataStd_Comment_HeaderFile
+#include <Handle_TDataStd_Comment.hxx>
+#endif
+
+class Standard_Transient;
+class Handle_Standard_Type;
+class Handle(TDataStd_Comment);
+class SALOMEDS_FileType;
+Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_FileType);
+
+class Handle(SALOMEDS_FileType) : public Handle(TDataStd_Comment) {
+  public:
+    void* operator new(size_t,void* anAddress) 
+      {
+        return anAddress;
+      }
+    void* operator new(size_t size) 
+      { 
+        return Standard::Allocate(size); 
+      }
+    void  operator delete(void *anAddress) 
+      { 
+        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
+      }
+    Handle(SALOMEDS_FileType)():Handle(TDataStd_Comment)() {} 
+    Handle(SALOMEDS_FileType)(const Handle(SALOMEDS_FileType)& aHandle) : Handle(TDataStd_Comment)(aHandle) 
+     {
+     }
+
+    Handle(SALOMEDS_FileType)(const SALOMEDS_FileType* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem) 
+     {
+     }
+
+    Handle(SALOMEDS_FileType)& operator=(const Handle(SALOMEDS_FileType)& aHandle)
+     {
+      Assign(aHandle.Access());
+      return *this;
+     }
+
+    Handle(SALOMEDS_FileType)& operator=(const SALOMEDS_FileType* anItem)
+     {
+      Assign((Standard_Transient *)anItem);
+      return *this;
+     }
+
+    SALOMEDS_FileType* operator->() 
+     {
+      return (SALOMEDS_FileType *)ControlAccess();
+     }
+
+    SALOMEDS_FileType* operator->() const 
+     {
+      return (SALOMEDS_FileType *)ControlAccess();
+     }
+
+   Standard_EXPORT ~Handle(SALOMEDS_FileType)();
+   Standard_EXPORT static const Handle(SALOMEDS_FileType) DownCast(const Handle(Standard_Transient)& AnObject);
+};
+#endif
index 873929b8017631d23e311300da24dee7e707d01e..394cd98d90e31e886198cff796be090b474f8f47 100644 (file)
@@ -50,8 +50,12 @@ LIB_SRC =    \
                  SALOMEDS_OCAFApplication.cxx \
                  SALOMEDS_GenericAttribute_i.cxx \
                  SALOMEDS_IORAttribute.cxx \
+                 SALOMEDS_ExternalFileDef.cxx \
+                 SALOMEDS_FileType.cxx \
                  SALOMEDS_PersRefAttribute.cxx \
                  SALOMEDS_AttributeComment_i.cxx \
+                 SALOMEDS_AttributeExternalFileDef_i.cxx \
+                 SALOMEDS_AttributeFileType_i.cxx \
                  SALOMEDS_AttributeIOR_i.cxx \
                  SALOMEDS_AttributeInteger_i.cxx \
                  SALOMEDS_AttributeName_i.cxx \
@@ -107,7 +111,7 @@ BIN_CLIENT_IDL =
 
 CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES)
 CXXFLAGS+=$(OCC_CXXFLAGS)
-LDFLAGS+= $(HDF5_LIBS) -lTOOLSDS -lSalomeNS -lSalomeHDFPersist -lOpUtil -lSalomeLoggerServer $(CAS_LDPATH) -lTKCAF
+LDFLAGS+= $(HDF5_LIBS) -lTOOLSDS -lSalomeNS -lSalomeHDFPersist -lOpUtil -lSALOMELocalTrace $(CAS_LDPATH) -lTKCAF
 
 @CONCLUDE@
 
diff --git a/src/SALOMEDS/README_attributes b/src/SALOMEDS/README_attributes
new file mode 100644 (file)
index 0000000..b0c4ff7
--- /dev/null
@@ -0,0 +1,46 @@
+
+$Header$
+
+How to add a new attribute (without WOK): 
+-----------------------------------------
+
+This works only for simple types (ex: string)
+
+example: add attribute FileType (string)
+
+# new files (copied from files specific to ExternalFileDef attribute = string):
+
+? src/SALOMEDS/Handle_SALOMEDS_FileType.hxx      <---  Handle_SALOMEDS_ExternalFileDef.hxx
+? src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx  <---  SALOMEDS_AttributeExternalFileDef_i.cxx
+? src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx  <---  SALOMEDS_AttributeExternalFileDef_i.hxx
+? src/SALOMEDS/SALOMEDS_FileType.cdl             <---  SALOMEDS_ExternalFileDef.cdl
+? src/SALOMEDS/SALOMEDS_FileType.cxx             <---  SALOMEDS_ExternalFileDef.cxx
+? src/SALOMEDS/SALOMEDS_FileType.hxx             <---  SALOMEDS_ExternalFileDef.hxx
+? src/SALOMEDS/SALOMEDS_FileType.ixx             <---  SALOMEDS_ExternalFileDef.ixx
+? src/SALOMEDS/SALOMEDS_FileType.jxx             <---  SALOMEDS_ExternalFileDef.jxx
+
+# files modified:
+
+M idl/SALOMEDS_Attributes.idl
+M src/SALOMEDS/Makefile.in
+M src/SALOMEDS/SALOMEDS_SObject_i.cxx
+M src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx
+
+# detailled modifications:
+
+- in new files,
+change ExternalFileDef in FileType everywhere
+- in SALOMEDS_FileType.cxx,
+Standard_GUID (Global Universal IDentifier) must be changed.
+To obtain a new GUID, it is possible to use guidgen.exe on windows (with visual C++).
+
+- in src/SALOMEDS/Makefile.in,
+add under LIB_SRC = \
+                 SALOMEDS_FileType.cxx \
+                 SALOMEDS_AttributeExternalFileDef_i.cxx \
+
+- in src/SALOMEDS/SALOMEDS_SObject_i.cxx,
+- in src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx,
+- in idl/SALOMEDS_Attributes.idl,
+find portions of code containing ExternalFileDef, duplicate and replace
+
diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx
new file mode 100644 (file)
index 0000000..94e2a31
--- /dev/null
@@ -0,0 +1,48 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeExternalFileDef_i.cxx
+//  Author : Yves FRICAUD
+//  Module : SALOME
+//  $Header$
+
+using namespace std;
+#include "SALOMEDS_AttributeExternalFileDef_i.hxx"
+
+#include <TCollection_ExtendedString.hxx>
+#include "SALOMEDS_SObject_i.hxx"
+
+char* SALOMEDS_AttributeExternalFileDef_i::Value()
+{
+  TCollection_ExtendedString S = Handle(SALOMEDS_ExternalFileDef)::DownCast(_myAttr)->Get();
+  CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(S).ToCString());
+  return c_s._retn();
+}
+
+void SALOMEDS_AttributeExternalFileDef_i::SetValue(const char* value) 
+{
+  CheckLocked();
+  CORBA::String_var Str = CORBA::string_dup(value);
+  //  Handle(SALOMEDS_ExternalFileDef)::DownCast(_myAttr)->Set(TCollection_ExtendedString(Str));
+  Handle(TDataStd_Comment)::DownCast(_myAttr)->Set(TCollection_ExtendedString(Str));
+}
diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.hxx
new file mode 100644 (file)
index 0000000..b6d5244
--- /dev/null
@@ -0,0 +1,56 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeExternalFileDef_i.hxx
+//  Author : Yves FRICAUD
+//  Module : SALOME
+//  $Header$
+
+#ifndef SALOMEDS_AttributeExternalFileDef_i_HeaderFile
+#define SALOMEDS_AttributeExternalFileDef_i_HeaderFile
+
+// IDL headers
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+#include "SALOMEDS_GenericAttribute_i.hxx"
+#include "SALOMEDS_ExternalFileDef.hxx"
+
+class SALOMEDS_AttributeExternalFileDef_i: public virtual POA_SALOMEDS::AttributeExternalFileDef,
+                                  public virtual SALOMEDS_GenericAttribute_i {
+public:
+  
+  SALOMEDS_AttributeExternalFileDef_i(const Handle(SALOMEDS_ExternalFileDef)& theCommentAttr, CORBA::ORB_ptr orb) 
+  {
+    _myOrb = CORBA::ORB::_duplicate(orb);
+    _myAttr = theCommentAttr;
+  }
+  ~SALOMEDS_AttributeExternalFileDef_i() {};
+
+  char* Value();
+  void SetValue(const char* value);
+  
+};
+
+
+
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx
new file mode 100644 (file)
index 0000000..d40a53f
--- /dev/null
@@ -0,0 +1,48 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeFileType_i.cxx
+//  Author : Yves FRICAUD
+//  Module : SALOME
+//  $Header$
+
+using namespace std;
+#include "SALOMEDS_AttributeFileType_i.hxx"
+
+#include <TCollection_ExtendedString.hxx>
+#include "SALOMEDS_SObject_i.hxx"
+
+char* SALOMEDS_AttributeFileType_i::Value()
+{
+  TCollection_ExtendedString S = Handle(SALOMEDS_FileType)::DownCast(_myAttr)->Get();
+  CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(S).ToCString());
+  return c_s._retn();
+}
+
+void SALOMEDS_AttributeFileType_i::SetValue(const char* value) 
+{
+  CheckLocked();
+  CORBA::String_var Str = CORBA::string_dup(value);
+  //  Handle(SALOMEDS_FileType)::DownCast(_myAttr)->Set(TCollection_ExtendedString(Str));
+  Handle(TDataStd_Comment)::DownCast(_myAttr)->Set(TCollection_ExtendedString(Str));
+}
diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.hxx
new file mode 100644 (file)
index 0000000..324c5cb
--- /dev/null
@@ -0,0 +1,56 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_AttributeFileType_i.hxx
+//  Author : Yves FRICAUD
+//  Module : SALOME
+//  $Header$
+
+#ifndef SALOMEDS_AttributeFileType_i_HeaderFile
+#define SALOMEDS_AttributeFileType_i_HeaderFile
+
+// IDL headers
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
+#include "SALOMEDS_GenericAttribute_i.hxx"
+#include "SALOMEDS_FileType.hxx"
+
+class SALOMEDS_AttributeFileType_i: public virtual POA_SALOMEDS::AttributeFileType,
+                                  public virtual SALOMEDS_GenericAttribute_i {
+public:
+  
+  SALOMEDS_AttributeFileType_i(const Handle(SALOMEDS_FileType)& theCommentAttr, CORBA::ORB_ptr orb) 
+  {
+    _myOrb = CORBA::ORB::_duplicate(orb);
+    _myAttr = theCommentAttr;
+  }
+  ~SALOMEDS_AttributeFileType_i() {};
+
+  char* Value();
+  void SetValue(const char* value);
+  
+};
+
+
+
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_ExternalFileDef.cdl b/src/SALOMEDS/SALOMEDS_ExternalFileDef.cdl
new file mode 100644 (file)
index 0000000..a5ab6d2
--- /dev/null
@@ -0,0 +1,76 @@
+--  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+--
+--  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+--  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+-- 
+--  This library is free software; you can redistribute it and/or 
+--  modify it under the terms of the GNU Lesser General Public 
+--  License as published by the Free Software Foundation; either 
+--  version 2.1 of the License. 
+-- 
+--  This library is distributed in the hope that it will be useful, 
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+--  Lesser General Public License for more details. 
+-- 
+--  You should have received a copy of the GNU Lesser General Public 
+--  License along with this library; if not, write to the Free Software 
+--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+-- 
+--  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+--
+--
+--
+--  File   : SALOMEDS_ExternalFileDef.cdl
+--  Author : Yves FRICAUD
+--  Module : SALOME
+
+class ExternalFileDef from SALOMEDS inherits Comment from TDataStd
+
+       ---Purpose: 
+
+
+uses Attribute         from TDF,
+     Label             from TDF,
+     GUID              from Standard,
+     ExtendedString    from TCollection,
+     DataSet           from TDF,
+     RelocationTable   from TDF,
+     AttributeSequence from TDF,
+     Data              from TDF,
+     Comment           from TDataStd
+
+
+is    
+
+
+    ---Purpose: class methods
+    --          =============
+
+    GetID (myclass)   
+    ---C++: return const &  
+    returns GUID from Standard;    
+
+    Set (myclass; label : Label from TDF; 
+        Name : ExtendedString from TCollection)
+    returns ExternalFileDef from SALOMEDS;
+    
+    ---Purpose: Comment methods
+    --          ============
+    
+    Create 
+    returns mutable ExternalFileDef from SALOMEDS;
+
+    ID (me)
+       ---C++: return const & 
+    returns GUID from Standard;
+
+    Restore (me: mutable; with : Attribute from TDF);
+
+    NewEmpty (me)
+    returns mutable Attribute from TDF;
+
+    Paste (me; into : mutable Attribute from TDF;
+              RT   : mutable RelocationTable from TDF);    
+
+end ExternalFileDef;
diff --git a/src/SALOMEDS/SALOMEDS_ExternalFileDef.cxx b/src/SALOMEDS/SALOMEDS_ExternalFileDef.cxx
new file mode 100644 (file)
index 0000000..2e07b01
--- /dev/null
@@ -0,0 +1,114 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_ExternalFileDef.cxx
+//  Author : Yves FRICAUD
+//  Module : SALOME
+//  $Header: 
+
+#include "SALOMEDS_ExternalFileDef.ixx"
+#include <TDataStd_Comment.hxx>
+#include <TCollection_ExtendedString.hxx>
+using namespace std;
+
+//=======================================================================
+//function : GetID
+//purpose  : 
+//=======================================================================
+
+const Standard_GUID& SALOMEDS_ExternalFileDef::GetID () 
+{
+  static Standard_GUID SALOMEDS_ExternalFileDefID ("7123AD4C-ACDB-4e3a-8FDC-70EA164D2CBE");
+  return SALOMEDS_ExternalFileDefID;
+}
+
+
+
+//=======================================================================
+//function : Set
+//purpose  : 
+//=======================================================================
+
+Handle(SALOMEDS_ExternalFileDef) SALOMEDS_ExternalFileDef::Set (const TDF_Label& L,
+                                                               const TCollection_ExtendedString& S) 
+{
+
+  Handle(SALOMEDS_ExternalFileDef) A;
+  if (!L.FindAttribute(SALOMEDS_ExternalFileDef::GetID(),A)) {
+    A = new  SALOMEDS_ExternalFileDef(); 
+    L.AddAttribute(A);
+  }
+  
+  (Handle(TDataStd_Comment)::DownCast(A))->Set (S); 
+  return A;
+}
+
+
+//=======================================================================
+//function : constructor
+//purpose  : 
+//=======================================================================
+SALOMEDS_ExternalFileDef::SALOMEDS_ExternalFileDef()
+{}
+
+//=======================================================================
+//function : ID
+//purpose  : 
+//=======================================================================
+
+const Standard_GUID& SALOMEDS_ExternalFileDef::ID () const { return GetID(); }
+
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+
+Handle(TDF_Attribute) SALOMEDS_ExternalFileDef::NewEmpty () const
+{  
+  return new SALOMEDS_ExternalFileDef(); 
+}
+
+//=======================================================================
+//function : Restore
+//purpose  : 
+//=======================================================================
+
+void SALOMEDS_ExternalFileDef::Restore(const Handle(TDF_Attribute)& with) 
+{
+  TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
+  TDataStd_Comment::Set(s);
+  return;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : 
+//=======================================================================
+
+void SALOMEDS_ExternalFileDef::Paste (const Handle(TDF_Attribute)& into,
+                          const Handle(TDF_RelocationTable)& RT) const
+{
+  Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
+}
+
diff --git a/src/SALOMEDS/SALOMEDS_ExternalFileDef.hxx b/src/SALOMEDS/SALOMEDS_ExternalFileDef.hxx
new file mode 100644 (file)
index 0000000..5abb183
--- /dev/null
@@ -0,0 +1,108 @@
+// File generated by CPPExt (Transient)
+//
+//                     Copyright (C) 1991,1995 by
+//  
+//                      MATRA DATAVISION, FRANCE
+//  
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//  
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+//
+#ifndef _SALOMEDS_ExternalFileDef_HeaderFile
+#define _SALOMEDS_ExternalFileDef_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Handle_SALOMEDS_ExternalFileDef_HeaderFile
+#include <Handle_SALOMEDS_ExternalFileDef.hxx>
+#endif
+
+#ifndef _TDataStd_Comment_HeaderFile
+#include <TDataStd_Comment.hxx>
+#endif
+#ifndef _Handle_TDF_Attribute_HeaderFile
+#include <Handle_TDF_Attribute.hxx>
+#endif
+#ifndef _Handle_TDF_RelocationTable_HeaderFile
+#include <Handle_TDF_RelocationTable.hxx>
+#endif
+class Standard_GUID;
+class TDF_Label;
+class TCollection_ExtendedString;
+class TDF_Attribute;
+class TDF_RelocationTable;
+
+
+class SALOMEDS_ExternalFileDef : public TDataStd_Comment {
+
+public:
+
+    void* operator new(size_t,void* anAddress) 
+      {
+        return anAddress;
+      }
+    void* operator new(size_t size) 
+      { 
+        return Standard::Allocate(size); 
+      }
+    void  operator delete(void *anAddress) 
+      { 
+        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
+      }
+ // Methods PUBLIC
+ // 
+Standard_EXPORT static const Standard_GUID& GetID() ;
+Standard_EXPORT static  Handle_SALOMEDS_ExternalFileDef Set(const TDF_Label& label,const TCollection_ExtendedString& Name) ;
+Standard_EXPORT SALOMEDS_ExternalFileDef();
+Standard_EXPORT  const Standard_GUID& ID() const;
+Standard_EXPORT   void Restore(const Handle(TDF_Attribute)& with) ;
+Standard_EXPORT   Handle_TDF_Attribute NewEmpty() const;
+Standard_EXPORT   void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
+Standard_EXPORT ~SALOMEDS_ExternalFileDef();
+
+
+
+
+ // Type management
+ //
+ Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_ExternalFileDef_Type_();
+ Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
+ Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+
+protected:
+
+ // Methods PROTECTED
+ // 
+
+
+ // Fields PROTECTED
+ //
+
+
+private: 
+
+ // Methods PRIVATE
+ // 
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_ExternalFileDef.ixx b/src/SALOMEDS/SALOMEDS_ExternalFileDef.ixx
new file mode 100644 (file)
index 0000000..2235302
--- /dev/null
@@ -0,0 +1,73 @@
+// File generated by CPPExt (Transient)
+//                     Copyright (C) 1991,1995 by
+//  
+//                      MATRA DATAVISION, FRANCE
+//  
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//  
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+//
+#include <SALOMEDS_ExternalFileDef.jxx>
+
+#ifndef _Standard_TypeMismatch_HeaderFile
+#include <Standard_TypeMismatch.hxx>
+#endif
+
+SALOMEDS_ExternalFileDef::~SALOMEDS_ExternalFileDef() {}
+
+
+Standard_EXPORT Handle_Standard_Type& SALOMEDS_ExternalFileDef_Type_()
+{
+
+    static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
+  if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
+  static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
+  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
+  static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
+  if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
+  static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
+  if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
+
+  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
+  static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_ExternalFileDef",
+                                                        sizeof(SALOMEDS_ExternalFileDef),
+                                                        1,
+                                                        (Standard_Address)_Ancestors,
+                                                        (Standard_Address)NULL);
+
+  return _aType;
+}
+
+
+// DownCast method
+//   allow safe downcasting
+//
+const Handle(SALOMEDS_ExternalFileDef) Handle(SALOMEDS_ExternalFileDef)::DownCast(const Handle(Standard_Transient)& AnObject) 
+{
+  Handle(SALOMEDS_ExternalFileDef) _anOtherObject;
+
+  if (!AnObject.IsNull()) {
+     if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_ExternalFileDef))) {
+       _anOtherObject = Handle(SALOMEDS_ExternalFileDef)((Handle(SALOMEDS_ExternalFileDef)&)AnObject);
+     }
+  }
+
+  return _anOtherObject ;
+}
+const Handle(Standard_Type)& SALOMEDS_ExternalFileDef::DynamicType() const 
+{ 
+  return STANDARD_TYPE(SALOMEDS_ExternalFileDef) ; 
+}
+Standard_Boolean SALOMEDS_ExternalFileDef::IsKind(const Handle(Standard_Type)& AType) const 
+{ 
+  return (STANDARD_TYPE(SALOMEDS_ExternalFileDef) == AType || TDataStd_Comment::IsKind(AType)); 
+}
+Handle_SALOMEDS_ExternalFileDef::~Handle_SALOMEDS_ExternalFileDef() {}
+
diff --git a/src/SALOMEDS/SALOMEDS_ExternalFileDef.jxx b/src/SALOMEDS/SALOMEDS_ExternalFileDef.jxx
new file mode 100644 (file)
index 0000000..32adbec
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef _Standard_GUID_HeaderFile
+#include <Standard_GUID.hxx>
+#endif
+#ifndef _TDF_Label_HeaderFile
+#include <TDF_Label.hxx>
+#endif
+#ifndef _TCollection_ExtendedString_HeaderFile
+#include <TCollection_ExtendedString.hxx>
+#endif
+#ifndef _TDF_Attribute_HeaderFile
+#include <TDF_Attribute.hxx>
+#endif
+#ifndef _TDF_RelocationTable_HeaderFile
+#include <TDF_RelocationTable.hxx>
+#endif
+#ifndef _SALOMEDS_ExternalFileDef_HeaderFile
+#include <SALOMEDS_ExternalFileDef.hxx>
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_FileType.cdl b/src/SALOMEDS/SALOMEDS_FileType.cdl
new file mode 100644 (file)
index 0000000..d9e43f2
--- /dev/null
@@ -0,0 +1,76 @@
+--  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+--
+--  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+--  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+-- 
+--  This library is free software; you can redistribute it and/or 
+--  modify it under the terms of the GNU Lesser General Public 
+--  License as published by the Free Software Foundation; either 
+--  version 2.1 of the License. 
+-- 
+--  This library is distributed in the hope that it will be useful, 
+--  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+--  Lesser General Public License for more details. 
+-- 
+--  You should have received a copy of the GNU Lesser General Public 
+--  License along with this library; if not, write to the Free Software 
+--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+-- 
+--  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+--
+--
+--
+--  File   : SALOMEDS_FileType.cdl
+--  Author : Yves FRICAUD
+--  Module : SALOME
+
+class FileType from SALOMEDS inherits Comment from TDataStd
+
+       ---Purpose: 
+
+
+uses Attribute         from TDF,
+     Label             from TDF,
+     GUID              from Standard,
+     ExtendedString    from TCollection,
+     DataSet           from TDF,
+     RelocationTable   from TDF,
+     AttributeSequence from TDF,
+     Data              from TDF,
+     Comment           from TDataStd
+
+
+is    
+
+
+    ---Purpose: class methods
+    --          =============
+
+    GetID (myclass)   
+    ---C++: return const &  
+    returns GUID from Standard;    
+
+    Set (myclass; label : Label from TDF; 
+        Name : ExtendedString from TCollection)
+    returns FileType from SALOMEDS;
+    
+    ---Purpose: Comment methods
+    --          ============
+    
+    Create 
+    returns mutable FileType from SALOMEDS;
+
+    ID (me)
+       ---C++: return const & 
+    returns GUID from Standard;
+
+    Restore (me: mutable; with : Attribute from TDF);
+
+    NewEmpty (me)
+    returns mutable Attribute from TDF;
+
+    Paste (me; into : mutable Attribute from TDF;
+              RT   : mutable RelocationTable from TDF);    
+
+end FileType;
diff --git a/src/SALOMEDS/SALOMEDS_FileType.cxx b/src/SALOMEDS/SALOMEDS_FileType.cxx
new file mode 100644 (file)
index 0000000..515bbc5
--- /dev/null
@@ -0,0 +1,114 @@
+//  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOMEDS_FileType.cxx
+//  Author : Yves FRICAUD
+//  Module : SALOME
+//  $Header: 
+
+#include "SALOMEDS_FileType.ixx"
+#include <TDataStd_Comment.hxx>
+#include <TCollection_ExtendedString.hxx>
+using namespace std;
+
+//=======================================================================
+//function : GetID
+//purpose  : 
+//=======================================================================
+
+const Standard_GUID& SALOMEDS_FileType::GetID () 
+{
+  static Standard_GUID SALOMEDS_FileTypeID ("0181B525-3F15-4ab2-9DE3-5E2F54B5F340");
+  return SALOMEDS_FileTypeID;
+}
+
+
+
+//=======================================================================
+//function : Set
+//purpose  : 
+//=======================================================================
+
+Handle(SALOMEDS_FileType) SALOMEDS_FileType::Set (const TDF_Label& L,
+                                                               const TCollection_ExtendedString& S) 
+{
+
+  Handle(SALOMEDS_FileType) A;
+  if (!L.FindAttribute(SALOMEDS_FileType::GetID(),A)) {
+    A = new  SALOMEDS_FileType(); 
+    L.AddAttribute(A);
+  }
+  
+  (Handle(TDataStd_Comment)::DownCast(A))->Set (S); 
+  return A;
+}
+
+
+//=======================================================================
+//function : constructor
+//purpose  : 
+//=======================================================================
+SALOMEDS_FileType::SALOMEDS_FileType()
+{}
+
+//=======================================================================
+//function : ID
+//purpose  : 
+//=======================================================================
+
+const Standard_GUID& SALOMEDS_FileType::ID () const { return GetID(); }
+
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+
+Handle(TDF_Attribute) SALOMEDS_FileType::NewEmpty () const
+{  
+  return new SALOMEDS_FileType(); 
+}
+
+//=======================================================================
+//function : Restore
+//purpose  : 
+//=======================================================================
+
+void SALOMEDS_FileType::Restore(const Handle(TDF_Attribute)& with) 
+{
+  TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
+  TDataStd_Comment::Set(s);
+  return;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : 
+//=======================================================================
+
+void SALOMEDS_FileType::Paste (const Handle(TDF_Attribute)& into,
+                          const Handle(TDF_RelocationTable)& RT) const
+{
+  Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
+}
+
diff --git a/src/SALOMEDS/SALOMEDS_FileType.hxx b/src/SALOMEDS/SALOMEDS_FileType.hxx
new file mode 100644 (file)
index 0000000..d912aaa
--- /dev/null
@@ -0,0 +1,108 @@
+// File generated by CPPExt (Transient)
+//
+//                     Copyright (C) 1991,1995 by
+//  
+//                      MATRA DATAVISION, FRANCE
+//  
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//  
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+//
+#ifndef _SALOMEDS_FileType_HeaderFile
+#define _SALOMEDS_FileType_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Handle_SALOMEDS_FileType_HeaderFile
+#include <Handle_SALOMEDS_FileType.hxx>
+#endif
+
+#ifndef _TDataStd_Comment_HeaderFile
+#include <TDataStd_Comment.hxx>
+#endif
+#ifndef _Handle_TDF_Attribute_HeaderFile
+#include <Handle_TDF_Attribute.hxx>
+#endif
+#ifndef _Handle_TDF_RelocationTable_HeaderFile
+#include <Handle_TDF_RelocationTable.hxx>
+#endif
+class Standard_GUID;
+class TDF_Label;
+class TCollection_ExtendedString;
+class TDF_Attribute;
+class TDF_RelocationTable;
+
+
+class SALOMEDS_FileType : public TDataStd_Comment {
+
+public:
+
+    void* operator new(size_t,void* anAddress) 
+      {
+        return anAddress;
+      }
+    void* operator new(size_t size) 
+      { 
+        return Standard::Allocate(size); 
+      }
+    void  operator delete(void *anAddress) 
+      { 
+        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
+      }
+ // Methods PUBLIC
+ // 
+Standard_EXPORT static const Standard_GUID& GetID() ;
+Standard_EXPORT static  Handle_SALOMEDS_FileType Set(const TDF_Label& label,const TCollection_ExtendedString& Name) ;
+Standard_EXPORT SALOMEDS_FileType();
+Standard_EXPORT  const Standard_GUID& ID() const;
+Standard_EXPORT   void Restore(const Handle(TDF_Attribute)& with) ;
+Standard_EXPORT   Handle_TDF_Attribute NewEmpty() const;
+Standard_EXPORT   void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
+Standard_EXPORT ~SALOMEDS_FileType();
+
+
+
+
+ // Type management
+ //
+ Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_FileType_Type_();
+ Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
+ Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+
+protected:
+
+ // Methods PROTECTED
+ // 
+
+
+ // Fields PROTECTED
+ //
+
+
+private: 
+
+ // Methods PRIVATE
+ // 
+
+
+ // Fields PRIVATE
+ //
+
+
+};
+
+
+
+
+
+// other Inline functions and methods (like "C++: function call" methods)
+//
+
+
+#endif
diff --git a/src/SALOMEDS/SALOMEDS_FileType.ixx b/src/SALOMEDS/SALOMEDS_FileType.ixx
new file mode 100644 (file)
index 0000000..505e39d
--- /dev/null
@@ -0,0 +1,73 @@
+// File generated by CPPExt (Transient)
+//                     Copyright (C) 1991,1995 by
+//  
+//                      MATRA DATAVISION, FRANCE
+//  
+// This software is furnished in accordance with the terms and conditions
+// of the contract and with the inclusion of the above copyright notice.
+// This software or any other copy thereof may not be provided or otherwise
+// be made available to any other person. No title to an ownership of the
+// software is hereby transferred.
+//  
+// At the termination of the contract, the software and all copies of this
+// software must be deleted.
+//
+#include <SALOMEDS_FileType.jxx>
+
+#ifndef _Standard_TypeMismatch_HeaderFile
+#include <Standard_TypeMismatch.hxx>
+#endif
+
+SALOMEDS_FileType::~SALOMEDS_FileType() {}
+
+
+Standard_EXPORT Handle_Standard_Type& SALOMEDS_FileType_Type_()
+{
+
+    static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
+  if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
+  static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
+  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
+  static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
+  if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
+  static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
+  if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
+
+  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
+  static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_FileType",
+                                                        sizeof(SALOMEDS_FileType),
+                                                        1,
+                                                        (Standard_Address)_Ancestors,
+                                                        (Standard_Address)NULL);
+
+  return _aType;
+}
+
+
+// DownCast method
+//   allow safe downcasting
+//
+const Handle(SALOMEDS_FileType) Handle(SALOMEDS_FileType)::DownCast(const Handle(Standard_Transient)& AnObject) 
+{
+  Handle(SALOMEDS_FileType) _anOtherObject;
+
+  if (!AnObject.IsNull()) {
+     if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_FileType))) {
+       _anOtherObject = Handle(SALOMEDS_FileType)((Handle(SALOMEDS_FileType)&)AnObject);
+     }
+  }
+
+  return _anOtherObject ;
+}
+const Handle(Standard_Type)& SALOMEDS_FileType::DynamicType() const 
+{ 
+  return STANDARD_TYPE(SALOMEDS_FileType) ; 
+}
+Standard_Boolean SALOMEDS_FileType::IsKind(const Handle(Standard_Type)& AType) const 
+{ 
+  return (STANDARD_TYPE(SALOMEDS_FileType) == AType || TDataStd_Comment::IsKind(AType)); 
+}
+Handle_SALOMEDS_FileType::~Handle_SALOMEDS_FileType() {}
+
diff --git a/src/SALOMEDS/SALOMEDS_FileType.jxx b/src/SALOMEDS/SALOMEDS_FileType.jxx
new file mode 100644 (file)
index 0000000..0d838e4
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef _Standard_GUID_HeaderFile
+#include <Standard_GUID.hxx>
+#endif
+#ifndef _TDF_Label_HeaderFile
+#include <TDF_Label.hxx>
+#endif
+#ifndef _TCollection_ExtendedString_HeaderFile
+#include <TCollection_ExtendedString.hxx>
+#endif
+#ifndef _TDF_Attribute_HeaderFile
+#include <TDF_Attribute.hxx>
+#endif
+#ifndef _TDF_RelocationTable_HeaderFile
+#include <TDF_RelocationTable.hxx>
+#endif
+#ifndef _SALOMEDS_FileType_HeaderFile
+#include <SALOMEDS_FileType.hxx>
+#endif
index f9c00984eded0c70bf0307679b2198716a5a5cd2..e10791ded1314e1f0f4f2fceab03a046425796b9 100644 (file)
@@ -44,6 +44,8 @@ using namespace std;
 #include "SALOMEDS_AttributePersistentRef_i.hxx"
 #include "SALOMEDS_AttributeIOR_i.hxx"
 #include "SALOMEDS_AttributeComment_i.hxx"
+#include "SALOMEDS_AttributeExternalFileDef_i.hxx"
+#include "SALOMEDS_AttributeFileType_i.hxx"
 #include "SALOMEDS_AttributeName_i.hxx"
 #include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
 #include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
@@ -84,6 +86,8 @@ SALOMEDS_SObject_i::ReturnGUIDForAttribute(const char* aTypeOfAttribute)
    else if (strcmp(aTypeOfAttribute, "AttributeSequenceOfInteger") == 0 )  return SALOMEDS_SequenceOfIntegerAttribute::GetID();
    else if (strcmp(aTypeOfAttribute, "AttributeName") == 0 )               return TDataStd_Name::GetID();
    else if (strcmp(aTypeOfAttribute, "AttributeComment") == 0 )            return TDataStd_Comment::GetID();
+   else if (strcmp(aTypeOfAttribute, "AttributeExternalFileDef") == 0 )    return SALOMEDS_ExternalFileDef::GetID();
+   else if (strcmp(aTypeOfAttribute, "AttributeFileType") == 0 )           return SALOMEDS_FileType::GetID();
    else if (strcmp(aTypeOfAttribute, "AttributeIOR") == 0 )                return SALOMEDS_IORAttribute::GetID();
    else if (strcmp(aTypeOfAttribute, "AttributePersistentRef") == 0 )      return SALOMEDS_PersRefAttribute::GetID();
    else if (strcmp(aTypeOfAttribute, "AttributeDrawable") == 0 )           return SALOMEDS_DrawableAttribute::GetID();
@@ -121,6 +125,8 @@ char* SALOMEDS_SObject_i::AttributeIDToType(Standard_GUID ID)
 {
   if      (ID == TDataStd_Name::GetID())                        return "AttributeName";
   else if (ID == TDataStd_Comment::GetID())                     return "AttributeComment";
+  else if (ID == SALOMEDS_ExternalFileDef::GetID())             return "AttributeExternalFileDef";
+  else if (ID == SALOMEDS_FileType::GetID())                    return "AttributeFileType";
   else if (ID == SALOMEDS_IORAttribute::GetID())                return "AttributeIOR"; 
   else if (ID == SALOMEDS_PersRefAttribute::GetID())            return "AttributePersistentRef";
   else if (ID == TDataStd_Real::GetID())                        return "AttributeReal";
@@ -283,6 +289,16 @@ CORBA::Boolean SALOMEDS_SObject_i::FindAttribute (SALOMEDS::GenericAttribute_out
       anAttribute = Attr->AttributeComment::_this();
       return Standard_True;
     }
+    else if (strcmp(aTypeOfAttribute, "AttributeExternalFileDef") == 0 ) {
+      SALOMEDS_AttributeExternalFileDef_i* Attr = new SALOMEDS_AttributeExternalFileDef_i(Handle(SALOMEDS_ExternalFileDef)::DownCast(anAttr), _orb);
+      anAttribute = Attr->AttributeExternalFileDef::_this();
+      return Standard_True;
+    }
+    else if (strcmp(aTypeOfAttribute, "AttributeFileType") == 0 ) {
+      SALOMEDS_AttributeFileType_i* Attr = new SALOMEDS_AttributeFileType_i(Handle(SALOMEDS_FileType)::DownCast(anAttr), _orb);
+      anAttribute = Attr->AttributeFileType::_this();
+      return Standard_True;
+    }
     else if (strcmp(aTypeOfAttribute, "AttributeIOR") == 0 ) {
       SALOMEDS_AttributeIOR_i* Attr = new SALOMEDS_AttributeIOR_i(Handle(SALOMEDS_IORAttribute)::DownCast(anAttr), _orb);
       anAttribute = Attr->AttributeIOR::_this();
@@ -416,6 +432,14 @@ SALOMEDS::ListOfAttributes* SALOMEDS_SObject_i::GetAllAttributes()
         SALOMEDS_AttributeComment_i* Attr= new SALOMEDS_AttributeComment_i(Handle(TDataStd_Comment)::DownCast(anAttr), _orb);
         anAttribute = Attr->AttributeComment::_this();
       } 
+      else if (ReturnGUIDForAttribute("AttributeExternalFileDef") == anAttr->ID()) {
+        SALOMEDS_AttributeExternalFileDef_i* Attr= new SALOMEDS_AttributeExternalFileDef_i(Handle(SALOMEDS_ExternalFileDef)::DownCast(anAttr), _orb);
+        anAttribute = Attr->AttributeExternalFileDef::_this();
+      } 
+      else if (ReturnGUIDForAttribute("AttributeFileType") == anAttr->ID()) {
+        SALOMEDS_AttributeFileType_i* Attr= new SALOMEDS_AttributeFileType_i(Handle(SALOMEDS_FileType)::DownCast(anAttr), _orb);
+        anAttribute = Attr->AttributeFileType::_this();
+      } 
       else if (ReturnGUIDForAttribute("AttributeIOR") == anAttr->ID()) {
         SALOMEDS_AttributeIOR_i* Attr= new SALOMEDS_AttributeIOR_i(Handle(SALOMEDS_IORAttribute)::DownCast(anAttr), _orb);
         anAttribute = Attr->AttributeIOR::_this();
index 238dd2450a4b23314595a8de31c1ba9e2f82f953..11be220654bbb55fb295c09ec34430591caa1f76 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOMEDS)
 #include "SALOMEDS_StudyManager_i.hxx"
 #include "utilities.h"
-# include "Utils_SINGLETON.hxx"
+#include "Utils_SINGLETON.hxx"
 #include "SALOME_NamingService.hxx"
-//#define CHECKTIME
+
 #ifdef CHECKTIME
 #include <Utils_Timer.hxx>
 #endif
+using namespace std;
 
 // extern "C"
 // { // for ccmalloc memory debug
@@ -47,126 +47,142 @@ using namespace std;
 //////////////////////////////////////////////////////////////////////////
 int main(int argc, char** argv)
 {
-//   ccmalloc_static_initialization();
+  //   ccmalloc_static_initialization();
 
   MESSAGE("SALOMEDS_Server - main");
-  try {
-    // Initialise the ORB.
-    CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB3");
-    omniORB::MaxMessageSize(100 * 1024 * 1024);
-    // Obtain a reference to the root POA.
-    //
-    long TIMESleep = 250000000;
-    int NumberOfTries = 40;
-    int a;
-    timespec ts_req;
-    ts_req.tv_nsec=TIMESleep;
-    ts_req.tv_sec=0;
-    timespec ts_rem;
-    ts_rem.tv_nsec=0;
-    ts_rem.tv_sec=0;
-    CosNaming::NamingContext_var inc;
-    PortableServer::POA_var poa;
-    CORBA::Object_var theObj;
-    CORBA::Object_var obj;
-    CORBA::Object_var object;
-    SALOME_Logger::Logger_var log;
-    int SALOMEDS=0;
-    const char * Env = getenv("USE_LOGGER");
-    int EnvL =0;
-    if ((Env!=NULL) && (strlen(Env)))
-      EnvL=1;
-    CosNaming::Name name;
-    name.length(1);
-    name[0].id=CORBA::string_dup("Logger");    
-    PortableServer::POAManager_var pman; 
-    for (int i = 1; i<=NumberOfTries; i++){
-      if (i!=1) 
-       a=nanosleep(&ts_req,&ts_rem);
-      try{ 
-        obj = orb->resolve_initial_references("RootPOA");
-       if(!CORBA::is_nil(obj))
-         poa = PortableServer::POA::_narrow(obj);
-       if(!CORBA::is_nil(poa))
-         pman = poa->the_POAManager();
-       if(!CORBA::is_nil(orb)) 
-         theObj = orb->resolve_initial_references("NameService"); 
-       if (!CORBA::is_nil(theObj)){
-         inc = CosNaming::NamingContext::_narrow(theObj);
-         if(!CORBA::is_nil(inc)) {
-           MESSAGE( "SalomeDS Server: Naming Service was found" )
-           if(EnvL==1){
-             CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
-             SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
-             NS.init_orb( orb1 ) ;
-             for(int j=1; j<=NumberOfTries; j++){
-               if (j!=1) 
-                 a=nanosleep(&ts_req, &ts_rem);
-               try{
-                 object = inc->resolve(name);}
-                catch(CosNaming::NamingContext::NotFound){ MESSAGE( "SalomeDS Server: Logger Server wasn't found" ) }
-               catch(...){ MESSAGE( "SalomeDS Server: Unknown exception" ) }
-               if (!CORBA::is_nil(object))
-                 log = SALOME_Logger::Logger::_narrow(object);
-               if (!CORBA::is_nil(log)){
-                 MESSAGE( "SalomeDS Server: Logger Server was found" )
-                 log->ping();
-                 SALOMEDS=1;
-                 break;
-               }
-             }}
-         }}
-       
-      }
-      catch( const SALOME_Exception &ex )
+  try 
+    {
+      // Initialise the ORB.
+      CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB3");
+      omniORB::MaxMessageSize(100 * 1024 * 1024);
+      // Obtain a reference to the root POA.
+      //
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      int SALOMEDS=0;
+      const char * Env = getenv("USE_LOGGER");
+      int EnvL =0;
+      if ((Env!=NULL) && (strlen(Env)))
+       EnvL=1;
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id=CORBA::string_dup("Logger");    
+      PortableServer::POAManager_var pman; 
+      for (int i = 1; i<=NumberOfTries; i++)
        {
-         MESSAGE( "Communication Error : " << ex.what() )
-           return EXIT_FAILURE ;
+         if (i!=1) 
+           a=nanosleep(&ts_req,&ts_rem);
+         try
+           { 
+             obj = orb->resolve_initial_references("RootPOA");
+             if(!CORBA::is_nil(obj))
+               poa = PortableServer::POA::_narrow(obj);
+             if(!CORBA::is_nil(poa))
+               pman = poa->the_POAManager();
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService"); 
+             if (!CORBA::is_nil(theObj)){
+               inc = CosNaming::NamingContext::_narrow(theObj);
+               if(!CORBA::is_nil(inc))
+                 {
+                   MESSAGE( "SalomeDS Server: Naming Service was found" );
+                   if(EnvL==1)
+                     {
+                       CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
+                       SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
+                       NS.init_orb( orb1 ) ;
+                       for(int j=1; j<=NumberOfTries; j++)
+                         {
+                           if (j!=1) 
+                             a=nanosleep(&ts_req, &ts_rem);
+                           try
+                             {
+                               object = inc->resolve(name);
+                             }
+                           catch(CosNaming::NamingContext::NotFound)
+                             { 
+                               MESSAGE( "SalomeDS Server: Logger Server wasn't found" ); }
+
+                           catch(...)
+                             {
+                               MESSAGE( "SalomeDS Server: Unknown exception" );
+                             }
+                           if (!CORBA::is_nil(object))
+                             {
+                               MESSAGE( "SalomeDS Server: Logger Server was found" );
+                               SALOMEDS=1;
+                               break;
+                             }
+                         }
+                     }
+                 }
+             }
+       
+           }
+         catch( const SALOME_Exception &ex )
+           {
+             MESSAGE( "Communication Error : " << ex.what() );
+             return EXIT_FAILURE ;
+           }
+         if ((SALOMEDS==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
+           break;
        }
-      if ((SALOMEDS==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
-       break;
-         }
-    //    
     
-    // We allocate the objects on the heap.  Since these are reference
-    // counted objects, they will be deleted by the POA when they are no
-    // longer needed.    
-    SALOMEDS_StudyManager_i * myStudyManager_i = new  SALOMEDS_StudyManager_i(orb);
+      // We allocate the objects on the heap.  Since these are reference
+      // counted objects, they will be deleted by the POA when they are no
+      // longer needed.    
+      SALOMEDS_StudyManager_i * myStudyManager_i = new  SALOMEDS_StudyManager_i(orb);
  
-    // Activate the objects.  This tells the POA that the objects are
-    // ready to accept requests.
-    PortableServer::ObjectId_var myStudyManager_iid = poa->activate_object(myStudyManager_i);
-    myStudyManager_i->register_name("/myStudyManager");
+      // Activate the objects.  This tells the POA that the objects are
+      // ready to accept requests.
+      PortableServer::ObjectId_var myStudyManager_iid = poa->activate_object(myStudyManager_i);
+      myStudyManager_i->register_name("/myStudyManager");
        
-    // Obtain a POAManager, and tell the POA to start accepting
-    // requests on its objects.
-    pman = poa->the_POAManager();
-    pman->activate();
+      // Obtain a POAManager, and tell the POA to start accepting
+      // requests on its objects.
+      pman = poa->the_POAManager();
+      pman->activate();
 
 #ifdef CHECKTIME
-    Utils_Timer timer;
-    timer.Start();
-    timer.Stop();
-    MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
-    timer.ShowAbsolute();
+      Utils_Timer timer;
+      timer.Start();
+      timer.Stop();
+      MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
+      timer.ShowAbsolute();
 #endif
-    orb->run();
-    orb->destroy();
-  }
-  catch(CORBA::SystemException&) {
-    MESSAGE( "Caught CORBA::SystemException." )
-  }
-  catch(CORBA::Exception&) {
-    MESSAGE( "Caught CORBA::Exception." )
-  }
-  catch(omniORB::fatalException& fe) {
-    MESSAGE( "Caught omniORB::fatalException:" )
-    MESSAGE( "  file: " << fe.file() )
-    MESSAGE( "  line: " << fe.line() )
-    MESSAGE( "  mesg: " << fe.errmsg() )
-  }
-  catch(...) {
-    MESSAGE( "Caught unknown exception." )
-  }
+      orb->run();
+      orb->destroy();
+    }
+  catch(CORBA::SystemException&)
+    {
+      MESSAGE( "Caught CORBA::SystemException." );
+    }
+  catch(CORBA::Exception&)
+    {
+      MESSAGE( "Caught CORBA::Exception." );
+    }
+  catch(omniORB::fatalException& fe)
+    {
+      MESSAGE( "Caught omniORB::fatalException:" );
+      MESSAGE( "  file: " << fe.file() );
+      MESSAGE( "  line: " << fe.line() );
+      MESSAGE( "  mesg: " << fe.errmsg() );
+    }
+  catch(...) 
+    {
+      MESSAGE( "Caught unknown exception." );
+    }
   return 0;
 }
index 93eaa48bc39ba59c30d43c35be25ac43f126ef90..a0afc4e53d59a38b90ab9dd6c4081fc3c3ba7e22 100644 (file)
@@ -50,6 +50,8 @@ using namespace std;
 #include "SALOMEDS_AttributePersistentRef_i.hxx"
 #include "SALOMEDS_AttributeIOR_i.hxx"
 #include "SALOMEDS_AttributeComment_i.hxx"
+#include "SALOMEDS_AttributeExternalFileDef_i.hxx"
+#include "SALOMEDS_AttributeFileType_i.hxx"
 #include "SALOMEDS_AttributeName_i.hxx"
 #include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
 #include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
@@ -601,6 +603,26 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_StudyBuilder_i::FindOrCreateAttribute(SA
     SALOMEDS::AttributeComment_var aCA = aCommentAttr->AttributeComment::_this();
     return  aCA._retn();
   }
+  else if (strcmp(aTypeOfAttribute, "AttributeExternalFileDef") == 0 ) {
+    Handle(SALOMEDS_ExternalFileDef) anAttr;
+    if (!Lab.FindAttribute(SALOMEDS_ExternalFileDef::GetID(), anAttr)) {
+      anAttr = new SALOMEDS_ExternalFileDef;
+      Lab.AddAttribute(anAttr); 
+    }
+    SALOMEDS_AttributeExternalFileDef_i* anExternalFileDefAttr = new SALOMEDS_AttributeExternalFileDef_i(anAttr, _orb);
+    SALOMEDS::AttributeExternalFileDef_var aCA = anExternalFileDefAttr->AttributeExternalFileDef::_this();
+    return  aCA._retn();
+  }
+  else if (strcmp(aTypeOfAttribute, "AttributeFileType") == 0 ) {
+    Handle(SALOMEDS_FileType) anAttr;
+    if (!Lab.FindAttribute(SALOMEDS_FileType::GetID(), anAttr)) {
+      anAttr = new SALOMEDS_FileType;
+      Lab.AddAttribute(anAttr); 
+    }
+    SALOMEDS_AttributeFileType_i* anFileTypeAttr = new SALOMEDS_AttributeFileType_i(anAttr, _orb);
+    SALOMEDS::AttributeFileType_var aCA = anFileTypeAttr->AttributeFileType::_this();
+    return  aCA._retn();
+  }
   else if (strcmp(aTypeOfAttribute, "AttributeIOR") == 0 ) {
     Handle(SALOMEDS_IORAttribute) anAttr;
     if (!Lab.FindAttribute(SALOMEDS_IORAttribute::GetID(), anAttr)) {
@@ -836,6 +858,16 @@ CORBA::Boolean SALOMEDS_StudyBuilder_i::FindAttribute(SALOMEDS::SObject_ptr anOb
       anAttribute = Attr->AttributeComment::_this();
       return Standard_True;
     }
+    else if (strcmp(aTypeOfAttribute, "AttributeExternalFileDef") == 0 ) {
+      SALOMEDS_AttributeExternalFileDef_i* Attr= new SALOMEDS_AttributeExternalFileDef_i(Handle(SALOMEDS_ExternalFileDef)::DownCast(anAttr), _orb);
+      anAttribute = Attr->AttributeExternalFileDef::_this();
+      return Standard_True;
+    }
+    else if (strcmp(aTypeOfAttribute, "AttributeFileType") == 0 ) {
+      SALOMEDS_AttributeFileType_i* Attr= new SALOMEDS_AttributeFileType_i(Handle(SALOMEDS_FileType)::DownCast(anAttr), _orb);
+      anAttribute = Attr->AttributeFileType::_this();
+      return Standard_True;
+    }
     else if (strcmp(aTypeOfAttribute, "AttributeIOR") == 0 ) {
       SALOMEDS_AttributeIOR_i* Attr= new SALOMEDS_AttributeIOR_i(Handle(SALOMEDS_IORAttribute)::DownCast(anAttr), _orb);
       anAttribute = Attr->AttributeIOR::_this();
diff --git a/src/SALOMELocalTrace/Makefile.in b/src/SALOMELocalTrace/Makefile.in
new file mode 100644 (file)
index 0000000..6e3674a
--- /dev/null
@@ -0,0 +1,49 @@
+#  SALOMELocalTrace : log on local machine
+#
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library is distributed in the hope that it will be useful, 
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : Makefile.in
+#  Author : Paul RASCLE (EDF)
+#  Module : SALOME
+#  $Header$
+
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+# header files  
+EXPORT_HEADERS= SALOME_Log.hxx
+
+EXPORT_PYSCRIPTS = 
+
+# Libraries targets
+
+LIB = libSALOMELocalTrace.la 
+LIB_SRC = SALOME_Log.cxx
+
+LDFLAGS+= 
+
+@CONCLUDE@
diff --git a/src/SALOMELocalTrace/SALOME_Log.cxx b/src/SALOMELocalTrace/SALOME_Log.cxx
new file mode 100644 (file)
index 0000000..476d987
--- /dev/null
@@ -0,0 +1,57 @@
+//  SALOME_LocalTrace : log on local machine
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOME_Log.hxx
+//  Author : Vasily Rusyaev, Paul RASCLE, EDF
+//  Module : KERNEL
+//  $Header$
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+#include "SALOME_Log.hxx"
+
+SALOME_Log::SALOME_Log()
+{
+}
+
+SALOME_Log::~SALOME_Log()
+{
+}
+
+SALOME_Log& SALOME_Log::Instance()
+{
+  static SALOME_Log instance;
+  return instance;
+}
+
+void SALOME_Log::putMessage(std::ostream& msg)
+{
+  cout << std::flush;
+  cerr <<str() << std::flush;
+  rdbuf()->freeze(false);
+  seekp(0);
+}
+
diff --git a/src/SALOMELocalTrace/SALOME_Log.hxx b/src/SALOMELocalTrace/SALOME_Log.hxx
new file mode 100644 (file)
index 0000000..043d1e1
--- /dev/null
@@ -0,0 +1,85 @@
+//  SALOME Utils : general SALOME's definitions and tools
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOME_Log.hxx
+//  Author : Vasily Rusyaev (OCN), Paul RASCLE (EDF)
+//  Module : KERNEL
+//  $Header$
+
+#ifndef _SALOME_LOG_HXX_
+#define _SALOME_LOG_HXX_
+
+//these declarations for files don't using OCC includes (for example HDF)
+# ifdef WNT
+
+#  ifndef Standard_EXPORT
+#   define Standard_EXPORT __declspec( dllexport )
+// For global variables :
+#   define Standard_EXPORTEXTERN __declspec( dllexport ) extern
+#   define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
+#  endif  /* Standard_EXPORT */
+
+#  ifndef Standard_IMPORT
+#   define Standard_IMPORT __declspec( dllimport ) extern
+#   define Standard_IMPORTC extern "C" __declspec( dllimport )
+#  endif  /* Standard_IMPORT */
+
+# else  /* WNT */
+
+#  ifndef Standard_EXPORT
+#   define Standard_EXPORT
+// For global variables :
+#   define Standard_EXPORTEXTERN extern
+#   define Standard_EXPORTEXTERNC extern "C"
+#  endif  /* Standard_EXPORT */
+
+#  ifndef Standard_IMPORT
+#   define Standard_IMPORT extern
+#   define Standard_IMPORTC extern "C"
+#  endif  /* Standard_IMPORT */
+
+# endif  /* WNT */
+
+
+using namespace std;
+
+#include <iostream>
+#include <strstream>
+
+
+class SALOME_Log : public ostrstream
+{
+public:
+  virtual ~SALOME_Log();
+  static Standard_EXPORT SALOME_Log& Instance();
+  Standard_EXPORT void putMessage(std::ostream& msg);
+
+protected:
+  //disable creation of instances: force use static SALOME_Log& Instance()
+  SALOME_Log();
+};
+
+
+#define SLog SALOME_Log::Instance()
+
+#endif
diff --git a/src/SALOMELogger/Makefile.in b/src/SALOMELogger/Makefile.in
new file mode 100644 (file)
index 0000000..2a9f4f5
--- /dev/null
@@ -0,0 +1,50 @@
+#  SALOMELogger : CORBA distributed log
+#
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library is distributed in the hope that it will be useful, 
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : Makefile.in
+#  Author : Paul RASCLE (EDF)
+#  Module : SALOME
+#  $Header$
+
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+# header files  
+EXPORT_HEADERS= 
+
+EXPORT_PYSCRIPTS = 
+
+# Libraries targets
+
+LIB = libSALOMELoggerClient.la 
+LIB_SRC = SALOME_LoggerClient.cxx
+LIB_CLIENT_IDL = Logger.idl 
+
+LDFLAGS+= 
+
+@CONCLUDE@
diff --git a/src/SALOMELogger/SALOME_LoggerClient.cxx b/src/SALOMELogger/SALOME_LoggerClient.cxx
new file mode 100644 (file)
index 0000000..70f7650
--- /dev/null
@@ -0,0 +1,154 @@
+//  SALOME_LoggerClient : CORBA distributed log
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : SALOME_Loggerclient.hxx
+//  Author : Vasily Rusyaev, Paul RASCLE, EDF
+//  Module : KERNEL
+//  $Header$
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+
+#include "SALOME_Log.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(Logger)
+
+// class SALOME_LoggerClient : public SALOME_Log
+// {
+// protected:
+//   SALOME_Logger::Logger_var m_pInterfaceLogger; // object reference on Logger server
+// };
+
+SALOME_Logger::Logger_ptr m_pInterfaceLogger; // object reference on Logger server
+
+SALOME_Log::SALOME_Log()
+{
+  cout << "SALOME_LoggerClient: constructor" << endl;
+  //get reference on object reference from NS
+  //and initialize m_pInterfaceLogger 
+
+  int argc = 1;
+  char* argv[1] = {"application"};
+  try
+    {
+      //NB. You can't use SALOME_NamingService class because it uses MESSAGE macro
+      //Otherwise, you will get segmentation fault.   
+
+      //Initialize the ORB
+      CORBA::ORB_var orb = CORBA::ORB_init(argc,argv);
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id = CORBA::string_dup("Logger");
+      for (int i = 1; i<=NumberOfTries; i++)
+       {
+         if (i!=1) 
+           a=nanosleep(&ts_req,&ts_rem);
+         try
+           { 
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService");
+             if (!CORBA::is_nil(theObj))
+               inc = CosNaming::NamingContext::_narrow(theObj);
+           }  
+         catch( CORBA::COMM_FAILURE& )
+           {
+             cout<<"SALOME_LoggerClient: CORBA::COMM_FAILURE: Unable to contact the Naming Service"<<endl;
+           }
+          catch(...)
+           {
+             cout<<"SALOME_LoggerClient: Unknown exception dealing with Naming Service"<<endl;
+           }
+         
+         if(!CORBA::is_nil(inc))
+           {
+             obj = inc->resolve(name);
+             m_pInterfaceLogger = SALOME_Logger::Logger::_narrow(obj);
+             if (!CORBA::is_nil(m_pInterfaceLogger))
+               cout<<"SALOME_LoggerClient: Logger Server was found"<<endl;
+             break;
+           }
+       }          
+    }
+  catch (const CosNaming::NamingContext::NotFound&)
+    {
+      //       cout << "Caught exception: Naming Service can't found Logger";
+    }
+  catch (CORBA::COMM_FAILURE&)
+    {
+      //       cout << "Caught CORBA::SystemException CommFailure.";
+    }
+  catch (CORBA::SystemException&)
+    {
+      //       cout << "Caught CORBA::SystemException.";
+    }
+  catch (CORBA::Exception&)
+    {
+      //       cout << "Caught CORBA::Exception.";
+    }
+  catch (...)
+    {
+      //       cout << "Caught unknown exception.";
+    }
+  //cerr << "-----SALOME_Trace::SALOME_Trace----"<<endl;
+}
+
+SALOME_Log::~SALOME_Log()
+{
+}
+
+SALOME_Log& SALOME_Log::Instance()
+{
+  static SALOME_Log instance;
+  return instance;
+}
+
+void SALOME_Log::putMessage(std::ostream& msg)
+{
+  //write resulting string into Logger CORBA server
+
+  char* adt = str();
+  CORBA::String_var LogMsg = CORBA::string_dup(adt);
+  rdbuf()->freeze(false);
+  seekp(0);
+
+  if (CORBA::is_nil(m_pInterfaceLogger))
+    cout << LogMsg << std::flush;
+  else
+    m_pInterfaceLogger-> putMessage (LogMsg) ;
+ }
+
index 9e95d0c62efb3512dc32783dd455cdf873d51ae8..36ba65ddefbc20d6d1a9c185bf2f56d881192498 100644 (file)
@@ -51,7 +51,7 @@ BIN_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOM
 
 CPPFLAGS+=$(QT_MT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES)
 CXXFLAGS+=$(OCC_CXXFLAGS)
-LDFLAGS+=$(QT_MT_LIBS)  -lSalomeNS -lSalomeGUI -lSalomeObject -lSalomeLifeCycleCORBA -lqsplitterP -lOpUtil -lSalomeLoggerServer -lPlot2d -lSalomeVTKFilter
+LDFLAGS+=$(QT_MT_LIBS)  -lSalomeNS -lSalomeGUI -lSalomeObject -lSalomeLifeCycleCORBA -lqsplitterP -lOpUtil -lPlot2d -lSalomeVTKFilter -lSALOMELocalTrace
 
 
 @CONCLUDE@
index 99482aa3622354689f4948394e2b51c7afd4d06f..2b00367c27fd2e68b62b9e2b4aed275d87a00817 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header$
 
-# include "Utils_ORB_INIT.hxx"
-# include "Utils_SINGLETON.hxx"
-# include "SALOME_NamingService.hxx"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
+#include "SALOME_NamingService.hxx"
 #include <iostream>
 #include <unistd.h>
 using namespace std;
@@ -57,110 +57,117 @@ int main(int argc, char **argv)
 
   try
     {
-    ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-    ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
-    CORBA::ORB_var &orb = init( argc , argv ) ;
+      ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+      ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
+      CORBA::ORB_var &orb = init( argc , argv ) ;
 
-    //
-    long TIMESleep = 250000000;
-       int NumberOfTries = 40;
-       int a;
-       timespec ts_req;
-       ts_req.tv_nsec=TIMESleep;
-       ts_req.tv_sec=0;
-       timespec ts_rem;
-       ts_rem.tv_nsec=0;
-       ts_rem.tv_sec=0;
-       CosNaming::NamingContext_var inc;
-       PortableServer::POA_var poa;
-       CORBA::Object_var theObj;
-       CORBA::Object_var obj;
-       CORBA::Object_var object;
-       SALOME_Logger::Logger_var log;
-       SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
-       int SESSION=0;
-       const char * Env = getenv("USE_LOGGER"); 
-        int EnvL =0;
-       if ((Env!=NULL) && (strlen(Env)))
-         EnvL=1;
-       CosNaming::Name name;
-       name.length(1);
-       name[0].id=CORBA::string_dup("Logger");    
-       PortableServer::POAManager_var pman; 
-       for (int i = 1; i<=NumberOfTries; i++){
-         if (i!=1) 
-           a=nanosleep(&ts_req,&ts_rem);
-         try
+      //
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
+      int SESSION=0;
+      const char * Env = getenv("USE_LOGGER"); 
+      int EnvL =0;
+      if ((Env!=NULL) && (strlen(Env)))
+       EnvL=1;
+      CosNaming::Name name;
+      name.length(1);
+      name[0].id=CORBA::string_dup("Logger");    
+      PortableServer::POAManager_var pman; 
+      for (int i = 1; i<=NumberOfTries; i++){
+       if (i!=1) 
+         a=nanosleep(&ts_req,&ts_rem);
+       try
+         { 
            obj = orb->resolve_initial_references("RootPOA");
             if(!CORBA::is_nil(obj))
-           poa = PortableServer::POA::_narrow(obj);
+             poa = PortableServer::POA::_narrow(obj);
             if(!CORBA::is_nil(poa))
-           pman = poa->the_POAManager();
-             if(!CORBA::is_nil(orb)) 
-           theObj = orb->resolve_initial_references("NameService");
+             pman = poa->the_POAManager();
+           if(!CORBA::is_nil(orb)) 
+             theObj = orb->resolve_initial_references("NameService");
            if (!CORBA::is_nil(theObj))
              inc = CosNaming::NamingContext::_narrow(theObj);
-           }
-         catch( CORBA::COMM_FAILURE& )
-           {
-             MESSAGE( "Session Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
-               }
-         if(!CORBA::is_nil(inc)) {
-           MESSAGE( "Session Server: Naming Service was found" )
-             if(EnvL==1){
-               for(int j=1; j<=NumberOfTries; j++){
-                 if (j!=1) 
-                   a=nanosleep(&ts_req, &ts_rem);
-                 try{
-                   object = inc->resolve(name);
-                 }
-                 catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Session Server: Logger Server wasn't found" ) }
-                 catch(...){ MESSAGE( "Session Server: Unknown exception" ) }
-                 if (!CORBA::is_nil(object))
-                   log = SALOME_Logger::Logger::_narrow(object);
-                 if (!CORBA::is_nil(log)){
-                   MESSAGE( "Session Server: Loger Server was found" )
-                     log->ping();
-                    SESSION=1;
-                   break;
-                 }
-               }}
          }
-         if ((SESSION==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
-            break;
+       catch( CORBA::COMM_FAILURE& )
+         {
+           MESSAGE( "Session Server: CORBA::COMM_FAILURE: Unable to contact the Naming Service" );
+         }
+       if(!CORBA::is_nil(inc))
+         {
+           MESSAGE( "Session Server: Naming Service was found" );
+           if(EnvL==1)
+             {
+               for(int j=1; j<=NumberOfTries; j++)
+                 {
+                   if (j!=1) 
+                     a=nanosleep(&ts_req, &ts_rem);
+                   try
+                     {
+                       object = inc->resolve(name);
+                     }
+                   catch(CosNaming::NamingContext::NotFound)
+                     { MESSAGE( "Session Server: Logger Server wasn't found" );
+                     }
+                   catch(...)
+                     {
+                       MESSAGE( "Session Server: Unknown exception" ); 
+                     }
+                   if (!CORBA::is_nil(object))
+                     {
+                       MESSAGE( "Session Server: Loger Server was found" );
+                       SESSION=1;
+                       break;
+                     }
+                 }
              }
-    //
+         }
+       if ((SESSION==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
+         break;
+      }
    
-    // servant
-    SALOME_Session_i * mySALOME_Session = new SALOME_Session_i(argc, argv, orb, poa) ;
-    PortableServer::ObjectId_var mySALOME_Sessionid = poa->activate_object(mySALOME_Session) ;
-    MESSAGE("poa->activate_object(mySALOME_Session)")
+      // servant
+      SALOME_Session_i * mySALOME_Session = new SALOME_Session_i(argc, argv, orb, poa) ;
+      PortableServer::ObjectId_var mySALOME_Sessionid = poa->activate_object(mySALOME_Session) ;
+      MESSAGE("poa->activate_object(mySALOME_Session)")
 
-    obj = mySALOME_Session->_this() ;
-    CORBA::String_var sior(orb->object_to_string(obj)) ;
+       obj = mySALOME_Session->_this() ;
+      CORBA::String_var sior(orb->object_to_string(obj)) ;
 
-    mySALOME_Session->NSregister();
+      mySALOME_Session->NSregister();
 
-    mySALOME_Session->_remove_ref() ;
+      mySALOME_Session->_remove_ref() ;
 
-    //DECOMMENT PortableServer::POAManager_var pman = poa->the_POAManager() ;
-    pman->activate() ;
-    MESSAGE("pman->activate()")
+      //DECOMMENT PortableServer::POAManager_var pman = poa->the_POAManager() ;
+      pman->activate() ;
+      MESSAGE("pman->activate()")
 
-    orb->run() ;
-    orb->destroy() ;
+       orb->run() ;
+      orb->destroy() ;
     }
-    catch (CORBA::SystemException&)
+  catch (CORBA::SystemException&)
     {
-      INFOS("Caught CORBA::SystemException.")
+      INFOS("Caught CORBA::SystemException.");
     }
-    catch (CORBA::Exception&)
+  catch (CORBA::Exception&)
     {
-      INFOS("Caught CORBA::Exception.")
+      INFOS("Caught CORBA::Exception.");
     }
-    catch (...)
+  catch (...)
     {
-      INFOS("Caught unknown exception.")
+      INFOS("Caught unknown exception.");
     }
   return 0 ;
 }
index 41f346dedabb9b4d1f27bf1ba19028fed7b49bab..a3d0a4fdcedd42df54962a0567c1ebd21fa4d055 100644 (file)
@@ -29,7 +29,7 @@ BIN_CLIENT_IDL =
 
 CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES)
 CXXFLAGS+=$(OCC_CXXFLAGS)
-LDFLAGS+= -lOpUtil -lSalomeLoggerServer $(CAS_LDPATH) -lTKernel
+LDFLAGS+= -lOpUtil $(CAS_LDPATH) -lTKernel
 
 @CONCLUDE@
 
index 8d2709d607846ec5f410b272192ae8067e0816a1..8ee409d994cf8305a6dc254d3b9181a064bfbe48 100644 (file)
@@ -45,7 +45,7 @@ LIB_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl
 BIN = TestContainer TestLogger
 BIN_SRC = 
 
-LDFLAGS+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSalomeLoggerServer
+LDFLAGS+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace
 
 
 @CONCLUDE@
index 9849ce584bc5b451081003726348c614417794d4..d1f1c35bb430b6df0e797f0be58204b03a527ecd 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "utilities.h"
 #include <iostream>
 #include <unistd.h>
@@ -36,10 +35,12 @@ using namespace std;
 
 #include "SALOME_NamingService.hxx"
 #include "OpUtil.hxx"
-# include "Utils_ORB_INIT.hxx"
-# include "Utils_SINGLETON.hxx"
-# include "Utils_SALOME_Exception.hxx"
-# include "Utils_CommException.hxx"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
+#include "Utils_SALOME_Exception.hxx"
+#include "Utils_CommException.hxx"
+using namespace std;
+
 int main (int argc, char * argv[])
 {
 
@@ -55,74 +56,84 @@ int main (int argc, char * argv[])
 
       // Obtain a reference to the root POA
       //
-     long TIMESleep = 250000000;
-     int NumberOfTries = 40;
-     int a;
-     timespec ts_req;
-     ts_req.tv_nsec=TIMESleep;
-     ts_req.tv_sec=0;
-     timespec ts_rem;
-     ts_rem.tv_nsec=0;
-     ts_rem.tv_sec=0;
-     CosNaming::NamingContext_var inc;
-     PortableServer::POA_var poa;
-     CORBA::Object_var theObj;
-     CORBA::Object_var obj;
-     CORBA::Object_var object;
-     SALOME_Logger::Logger_var log;
-     SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
-     int TEST_CONTAINER=0;
-     const char * Env = getenv("USE_LOGGER"); 
+      long TIMESleep = 250000000;
+      int NumberOfTries = 40;
+      int a;
+      timespec ts_req;
+      ts_req.tv_nsec=TIMESleep;
+      ts_req.tv_sec=0;
+      timespec ts_rem;
+      ts_rem.tv_nsec=0;
+      ts_rem.tv_sec=0;
+      CosNaming::NamingContext_var inc;
+      PortableServer::POA_var poa;
+      CORBA::Object_var theObj;
+      CORBA::Object_var obj;
+      CORBA::Object_var object;
+      SALOME_NamingService &naming = *SINGLETON_<SALOME_NamingService>::Instance() ;
+      int TEST_CONTAINER=0;
+      const char * Env = getenv("USE_LOGGER"); 
       int EnvL =0;
       if ((Env!=NULL) && (strlen(Env)))
        EnvL=1;
       CosNaming::Name name;
       name.length(1);
       name[0].id=CORBA::string_dup("Logger");    
-     PortableServer::POAManager_var manager; 
-     for (int i = 1; i<=NumberOfTries; i++){
-       if (i!=1) 
-        a=nanosleep(&ts_req,&ts_rem);
-       try{ 
-        obj = orb->resolve_initial_references("RootPOA");
-        if(!CORBA::is_nil(obj))
-          poa = PortableServer::POA::_narrow(obj);
-        if(!CORBA::is_nil(poa))
-          manager = poa->the_POAManager();
-        if(!CORBA::is_nil(orb)) 
-          theObj = orb->resolve_initial_references("NameService");
-        if (!CORBA::is_nil(theObj))
-          inc = CosNaming::NamingContext::_narrow(theObj);
-       }
-       catch( CORBA::COMM_FAILURE& )
-        {
-          MESSAGE( "Test Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
-            }
-       if(!CORBA::is_nil(inc)) {
-        MESSAGE( "Test Container: Naming Service was found" )
-          if(EnvL==1){
-            for(int j=1; j<=NumberOfTries; j++){
-              if (j!=1) 
-                a=nanosleep(&ts_req, &ts_rem);
-              try{
-                object = inc->resolve(name);
-              }
-              catch(CosNaming::NamingContext::NotFound){ MESSAGE( "Test Container: Logger Server wasn't found" ) }
-              catch(...){ MESSAGE( "Test Container: Unknown exception" ) }
-              if (!CORBA::is_nil(object))
-                log = SALOME_Logger::Logger::_narrow(object);
-              if (!CORBA::is_nil(log)){
-                MESSAGE( "Test Container: Loger Server was found" )
-                  log->ping();
-                TEST_CONTAINER=1;
-                break;
+      PortableServer::POAManager_var manager; 
+      for (int i = 1; i<=NumberOfTries; i++)
+       {
+         if (i!=1) 
+           a=nanosleep(&ts_req,&ts_rem);
+         try
+           { 
+             obj = orb->resolve_initial_references("RootPOA");
+             if(!CORBA::is_nil(obj))
+               poa = PortableServer::POA::_narrow(obj);
+             if(!CORBA::is_nil(poa))
+               manager = poa->the_POAManager();
+             if(!CORBA::is_nil(orb)) 
+               theObj = orb->resolve_initial_references("NameService");
+             if (!CORBA::is_nil(theObj))
+               inc = CosNaming::NamingContext::_narrow(theObj);
+           }
+         catch( CORBA::COMM_FAILURE& )
+           {
+             MESSAGE( "Test Container: CORBA::COMM_FAILURE: Unable to contact the Naming Service" )
+               }
+         if(!CORBA::is_nil(inc))
+           {
+             MESSAGE( "Test Container: Naming Service was found" )
+               if(EnvL==1)
+                 {
+                   for(int j=1; j<=NumberOfTries; j++)
+                     {
+                       if (j!=1) 
+                         a=nanosleep(&ts_req, &ts_rem);
+                       try
+                         {
+                           object = inc->resolve(name);
+                         }
+                       catch(CosNaming::NamingContext::NotFound)
+                         {
+                           MESSAGE( "Test Container: Logger Server wasn't found" );
+                         }
+                       catch(...)
+                         {
+                           MESSAGE( "Test Container: Unknown exception" );
+                         }
+                       if (!CORBA::is_nil(object))
+                         {
+                           MESSAGE( "Test Container: Loger Server was found" );
+                           TEST_CONTAINER=1;
+                           break;
+                         }
+                     }
                  }
-               }}
-         }
+           }
          if ((TEST_CONTAINER==1)||((EnvL==0)&&(!CORBA::is_nil(inc))))
             break;
-             }
-      //
+       }
+
       // Use Name Service to find container
       SALOME_NamingService _NS(orb) ;
       string containerName = "/Containers/" ;
index aec4b20abd0b186ac102d46dad141c2ab83049ea..86ebc70efd27ab429b48388e04df32a8c1eb2d4e 100644 (file)
@@ -57,7 +57,7 @@ LIB_SRC = OpUtil.cxx Utils_Timer.cxx duplicate.cxx \
        Utils_Identity.cxx Utils_ORB_INIT.cxx \
        Utils_DESTRUCTEUR_GENERIQUE.cxx
 
-LDFLAGS+= -lSalomeLoggerServer
+LDFLAGS+= 
 
 @CONCLUDE@
 
index 59b79a7642611c014d5471c5c2612106b6d880f5..06f4a26f4fc671a9119e2e75bfb70d035c46faf6 100644 (file)
@@ -42,7 +42,7 @@ const char* duplicate( const char *const str ) ;
 
 SALOME_Exception::SALOME_Exception( void ): exception() , _text(0)
 {
-       MESSAGE( "You must user the standard builder : SALOME_Exception::SALOME_Exception( const char *text )" ) ;
+       MESSAGE( "You must use the standard builder: SALOME_Exception::SALOME_Exception( const char *text )" ) ;
        INTERRUPTION(1) ;
 }
 
index 52256eae84b9acca53ee92f754b1d49eef509441..015e84e58f0fd9263c47337d1e5ebad366078980 100644 (file)
 
 /* ---  Definition macros file to print informations if _DEBUG_ is defined --- */
 
-# ifndef UTILITIES_H
-# define UTILITIES_H
+#ifndef UTILITIES_H
+#define UTILITIES_H
 
-# include <stdlib.h>
-# include <iostream>
-
-
-
-//VRV: T2.4 - replacement macro for using special CORBA server
-#include "SALOME_Trace.hxx"
-//VRV: T2.4 - replacement macro for using special CORBA server
+#include <string>
+#include <iostream>
+#include "SALOME_Log.hxx"
 
 /* ---  INFOS is always defined (without _DEBUG_): to be used for warnings, with release version --- */
 
-//VRV: T2.4 - replacement of these macros for using special CORBA server
-
-#define INFOS(msg) { GLogger.putMessage(GLogger << __FILE__<< " [" << __LINE__ << "] : " << msg<< endl << ends ); }
-#define PYSCRIPT(msg) { GLogger.putMessage(GLogger<<"---PYSCRIPT--- "<<msg<<endl<<ends ); }
+#define INFOS(msg)    {SLog.putMessage(SLog<<__FILE__<<" ["<<__LINE__<<"] : "<<msg<<endl);}
+#define PYSCRIPT(msg) {SLog.putMessage(SLog<<"---PYSCRIPT--- "<<msg<<endl);}
 
-//# define HEREWEARE {cout<<flush ; cerr << __FILE__ << " [" << __LINE__ << "] : " << flush ;}
-//# define INFOS(chain) {HEREWEARE ; cerr << chain << endl ;}
-//# define PYSCRIPT(chain) {cout<<flush ; cerr << "---PYSCRIPT--- " << chain << endl ;}
+/* --- To print date and time of compilation of current source --- */
 
-//VRV: T2.4 - replacement of these macros for using special CORBA server
+#if defined ( __GNUC__ )
+#define COMPILER               "g++" 
+#elif defined ( __sun )
+#define COMPILER               "CC" 
+#elif defined ( __KCC )
+#define COMPILER               "KCC" 
+#elif defined ( __PGI )
+#define COMPILER               "pgCC" 
+#else
+#define COMPILER               "undefined" 
+#endif
 
+#ifdef INFOS_COMPILATION
+#error INFOS_COMPILATION already defined
+#endif
 
-/* --- To print date and time of compilation of current source on stdout --- */
-
-# if defined ( __GNUC__ )
-# define COMPILER              "g++" 
-# elif defined ( __sun )
-# define COMPILER              "CC" 
-# elif defined ( __KCC )
-# define COMPILER              "KCC" 
-# elif defined ( __PGI )
-# define COMPILER              "pgCC" 
-# else
-# define COMPILER              "undefined" 
-# endif
-
-# ifdef INFOS_COMPILATION
-# error INFOS_COMPILATION already defined
-# endif
-
-//VRV: T2.4 - replacement macro for using special CORBA server
 #define INFOS_COMPILATION { \
-                             GLogger.putMessage(\
-                                                GLogger << __FILE__ << " [" << __LINE__ << "] : "\
-                                                << "COMPILED with " << COMPILER \
-                                                << ", " << __DATE__ \
-                                                << " at " << __TIME__ << endl << endl <<endl<<ends); }
-/* # define INFOS_COMPILATION  {\ */
-/*                                     cerr << flush;\ */
-/*                                     cout << __FILE__ ;\ */
-/*                                     cout << " [" << __LINE__ << "] : " ;\ */
-/*                                     cout << "COMPILED with " << COMPILER ;\ */
-/*                                     cout << ", " << __DATE__ ; \ */
-/*                                     cout << " at " << __TIME__ << endl ;\ */
-/*                                     cout << "\n\n" ;\ */
-/*                                     cout << flush ;\ */
-/*                             } */
-//VRV: T2.4 - replacement macro for using special CORBA server
-
-# ifdef _DEBUG_
+                          SLog.putMessage(\
+                                          SLog<<__FILE__<<" ["<< __LINE__<<"] : "\
+                                          << "COMPILED with " << COMPILER \
+                                          << ", " << __DATE__ \
+                                          << " at " << __TIME__ <<endl); }
 
-/* --- the following MACROS are useful at debug time --- */
+#ifdef _DEBUG_
 
-//VRV: T2.4 - replacement of these macros for using special CORBA server
-
-#define MYTRACE GLogger << "- Trace " << __FILE__ << " [" << __LINE__ << "] : " 
-
-#define MESSAGE(msg) { GLogger.putMessage( MYTRACE <<msg<<endl<<ends); }
-#define SCRUTE(var) { GLogger.putMessage( MYTRACE << #var << "=" << var <<endl<<ends); }
-
-#define REPERE GLogger << "   --------------" << endl 
-#define BEGIN_OF(msg) {REPERE ; MYTRACE << "Begin of: " << msg << endl ; REPERE ; GLogger.putMessage(GLogger<<ends); } 
-#define END_OF(msg) {REPERE ; MYTRACE << "Normal end of: " << msg << endl ; REPERE ; GLogger.putMessage(GLogger<<ends); } 
-
-# define HERE {cout<<flush ; cerr << "- Trace " << __FILE__ << " [" << __LINE__ << "] : " << flush ;}
-
-//VRV: T2.4 - replacement of these macros for using special CORBA server
-
-# define INTERRUPTION(code) {HERE ; cerr << "INTERRUPTION return code= " << code << endl ; exit(code) ;}
+/* --- the following MACROS are useful at debug time --- */
 
-# ifndef ASSERT
-# define ASSERT(condition) if (!(condition)){ HERE ; cerr << "CONDITION " << #condition << " NOT VERIFIED"<< endl ; INTERRUPTION(1) ;}
-# endif /* ASSERT */
+#define MYTRACE SLog << "- Trace " << __FILE__ << " [" << __LINE__ << "] : " 
 
+#define MESSAGE(msg) {SLog.putMessage( MYTRACE <<msg<<endl<<ends); }
+#define SCRUTE(var)  {SLog.putMessage( MYTRACE << #var << "=" << var <<endl<<ends); }
 
+#define REPERE SLog << "   --------------" << endl 
+#define BEGIN_OF(msg) {REPERE;MYTRACE<<"Begin of: "     <<msg<<endl;REPERE;} 
+#define END_OF(msg)   {REPERE;MYTRACE<<"Normal end of: "<<msg<<endl;REPERE;} 
 
+#define HERE {cout<<flush ;cerr<<"- Trace "<<__FILE__<<" ["<<__LINE__<<"] : "<<flush ;}
 
+#define INTERRUPTION(code) {HERE;cerr<<"INTERRUPTION return code= "<<code<< endl;exit(code);}
 
+#ifndef ASSERT
+#define ASSERT(condition) \
+        if (!(condition)){HERE;cerr<<"CONDITION "<<#condition<<" NOT VERIFIED"<<endl;INTERRUPTION(1);}
+#endif /* ASSERT */
 
 
-# else /* ifdef _DEBUG_*/
+#else /* ifdef _DEBUG_*/
 
 #define HERE 
 #define SCRUTE(var) {}
 #define BEGIN_OF(msg) {}
 #define END_OF(msg) {}
 
-# define INTERRUPTION(code) {}
+#define INTERRUPTION(code) {}
 
-# ifndef ASSERT
-# define ASSERT(condition) {}
-# endif /* ASSERT */
+#ifndef ASSERT
+#define ASSERT(condition) {}
+#endif /* ASSERT */
 
 
-# endif /* ifdef _DEBUG_*/
+#endif /* ifdef _DEBUG_*/
 
-# endif /* ifndef UTILITIES_H */
+#endif /* ifndef UTILITIES_H */