]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 15:27:12 +0000 (16:27 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 15:27:12 +0000 (16:27 +0100)
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_Gen_i.hh
src/GEOM_SWIG/GeomHelper.cxx
src/GEOM_SWIG/geomBuilder.py

index 2f8c4882d7a8335433b3af337d65fa8d4fcc2691..a59018f9114ed9c8226a6072f38a06ffbcadcef3 100644 (file)
@@ -98,12 +98,15 @@ GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr            orb,
                        PortableServer::POA_ptr   poa,
                        PortableServer::ObjectId* contId,
                        const char*               instanceName,
-                       const char*               interfaceName) :
-  Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+                       const char*               interfaceName,
+                       bool withRegistry,
+                       bool withNS) :
+  Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, withRegistry)
 {
   _thisObj = this;
   _id = _poa->activate_object(_thisObj);
-  name_service = new SALOME_NamingService(_orb);
+  if(withNS)
+    name_service = new SALOME_NamingService(_orb);
 
   _impl = new ::GEOMImpl_Gen;
 
index ce3035be41f6eea261d15871b6faa09a2ae4521d..45eb79351ae4e01fa66cf1b0d8d858cc2ccf655e 100644 (file)
@@ -95,7 +95,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
              PortableServer::POA_ptr poa,
              PortableServer::ObjectId * contId,
              const char *instanceName,
-             const char *interfaceName);
+             const char *interfaceName,
+             bool withRegistry = true,
+             bool withNS = true);
 
   // destructor, doing nothing (for now)
   virtual ~GEOM_Gen_i();
@@ -388,7 +390,7 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
  private:
 
    ::GEOMImpl_Gen* _impl;
-   SALOME_NamingService * name_service;
+   SALOME_NamingService * name_service = nullptr;
    char * _name;
 
    // plugin operations managing
index d7c73ce2bad85c5ae8c961ddd7a4b2e96284dd02..f68bb062ff22d12844fb09d3c2081af68ff5a580 100644 (file)
@@ -44,7 +44,7 @@ std::string BuildGEOMInstance()
     //
     pman->activate();
     //
-    GEOM_Gen_i *servant = new GEOM_Gen_i(orb,poa,const_cast<PortableServer::ObjectId*>(&conId.in()),"GEOM_inst_2","GEOM");
+    GEOM_Gen_i *servant = new GEOM_Gen_i(orb,poa,const_cast<PortableServer::ObjectId*>(&conId.in()),"GEOM_inst_2","GEOM",false,false);
     PortableServer::ObjectId *zeId = servant->getId();
     CORBA::Object_var zeRef = poa->id_to_reference(*zeId);
     CORBA::String_var ior = orb->object_to_string(zeRef);
index 4365b3c23c809878ee6d1264b2cbe0d090fe1305..95e3952cba53f53395cbb7ae38f123c3c3c77661 100644 (file)
@@ -246,7 +246,7 @@ import omniORB
 # to avoid problems in some cases, e.g. when generating documentation
 try:
     import salome
-    salome.salome_init()
+    #salome.salome_init()
     from salome import *
 except:
     pass