From 01b0ad6701a92e80d546486c4c7556cc76d56c02 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 13 Jan 2021 16:27:12 +0100 Subject: [PATCH] WIP --- src/GEOM_I/GEOM_Gen_i.cc | 9 ++++++--- src/GEOM_I/GEOM_Gen_i.hh | 6 ++++-- src/GEOM_SWIG/GeomHelper.cxx | 2 +- src/GEOM_SWIG/geomBuilder.py | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 2f8c4882d..a59018f91 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -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; diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index ce3035be4..45eb79351 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -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 diff --git a/src/GEOM_SWIG/GeomHelper.cxx b/src/GEOM_SWIG/GeomHelper.cxx index d7c73ce2b..f68bb062f 100644 --- a/src/GEOM_SWIG/GeomHelper.cxx +++ b/src/GEOM_SWIG/GeomHelper.cxx @@ -44,7 +44,7 @@ std::string BuildGEOMInstance() // pman->activate(); // - GEOM_Gen_i *servant = new GEOM_Gen_i(orb,poa,const_cast(&conId.in()),"GEOM_inst_2","GEOM"); + GEOM_Gen_i *servant = new GEOM_Gen_i(orb,poa,const_cast(&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); diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 4365b3c23..95e3952cb 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -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