From 203cf427e4ecd04dbd6056b1d429e419671ae24c Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 21 Jan 2021 17:19:35 +0100 Subject: [PATCH] WIP --- src/SMESH_I/CMakeLists.txt | 4 ++++ src/SMESH_I/SMESH_Gen_i.cxx | 23 ----------------------- src/SMESH_I/SMESH_Gen_i.hxx | 4 +--- src/SMESH_SWIG/SMeshHelper.cxx | 8 ++++---- src/SMESH_SWIG/SMeshHelper.h | 2 +- src/SMESH_SWIG/SMeshHelper.i | 4 ++-- 6 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/SMESH_I/CMakeLists.txt b/src/SMESH_I/CMakeLists.txt index 762f2d134..cd73e1f09 100644 --- a/src/SMESH_I/CMakeLists.txt +++ b/src/SMESH_I/CMakeLists.txt @@ -90,6 +90,8 @@ SET(_link_LIBRARIES # header files / no moc processing SET(SMESHEngine_HEADERS SMESH_Gen_i.hxx + SMESH_Gen_No_Session_i.hxx + SMESH_Gen_Session_i.hxx SMESH_Algo_i.hxx SMESH_0D_Algo_i.hxx SMESH_1D_Algo_i.hxx @@ -117,6 +119,8 @@ SET(SMESHEngine_HEADERS SET(SMESHEngine_SOURCES SMESH_Gen_i.cxx SMESH_Gen_i_1.cxx + SMESH_Gen_No_Session_i.cxx + SMESH_Gen_Session_i.cxx SMESH_PythonDump.cxx SMESH_Mesh_i.cxx SMESH_subMesh_i.cxx diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 41f5da7dd..6bc1fbddb 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -6583,26 +6583,3 @@ std::vector SMESH_Gen_i::_GetInside( SMESH::SMESH_IDSource_ptr meshPart, } return res; } - -//============================================================================= -/*! - * SMESHEngine_factory - * - * C factory, accessible with dlsym, after dlopen - */ -//============================================================================= - -extern "C" -{ SMESH_I_EXPORT - PortableServer::ObjectId* SMESHEngine_factory( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId* contId, - const char* instanceName, - const char* interfaceName ) - { - if(MYDEBUG) MESSAGE( "PortableServer::ObjectId* SMESHEngine_factory()" ); - if(MYDEBUG) SCRUTE(interfaceName); - SMESH_Gen_i* aSMESHGen = new SMESH_Gen_i(orb, poa, contId, instanceName, interfaceName); - return aSMESHGen->getId() ; - } -} diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index 8e9007415..866b8c362 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -93,9 +93,7 @@ private: // =========================================================== // SMESH module's engine // ========================================================== -class SMESH_I_EXPORT SMESH_Gen_i: - public virtual POA_SMESH::SMESH_Gen, - public virtual Engines_Component_i +class SMESH_I_EXPORT SMESH_Gen_i : public POA_SMESH::SMESH_Gen, public Engines_Component_i { public: // Get last created instance of the class diff --git a/src/SMESH_SWIG/SMeshHelper.cxx b/src/SMESH_SWIG/SMeshHelper.cxx index 78f24d2d1..48b910fe3 100644 --- a/src/SMESH_SWIG/SMeshHelper.cxx +++ b/src/SMESH_SWIG/SMeshHelper.cxx @@ -19,13 +19,13 @@ #include "SMeshHelper.h" -#include "SMESH_Gen_i.hxx" +#include "SMESH_Gen_No_Session_i.hxx" #include "SALOME_Container_i.hxx" #include "SALOME_KernelServices.hxx" #include -std::string BuildSMESHInstanceInternal(bool checkNS) +std::string BuildSMESHInstanceInternal() { CORBA::ORB_var orb; { int argc(0); orb = CORBA::ORB_init(argc,nullptr); } @@ -36,13 +36,13 @@ std::string BuildSMESHInstanceInternal(bool checkNS) // { char *argv[4] = {"Container","FactoryServer","toto",nullptr}; - Engines_Container_i *cont = new Engines_Container_i(orb,poa,"FactoryServer",2,argv,false,checkNS); + Engines_Container_i *cont = new Engines_Container_i(orb,poa,"FactoryServer",2,argv,false,false); conId = poa->activate_object(cont); } // pman->activate(); // - SMESH_Gen_i *servant = new SMESH_Gen_i(orb,poa,const_cast(&conId.in()),"SMESH_inst_2","SMESH",checkNS); + SMESH_Gen_No_Session_i *servant = new SMESH_Gen_No_Session_i(orb,poa,const_cast(&conId.in()),"SMESH_inst_2","SMESH"); 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/SMESH_SWIG/SMeshHelper.h b/src/SMESH_SWIG/SMeshHelper.h index bef5532ca..58b2c5321 100644 --- a/src/SMESH_SWIG/SMeshHelper.h +++ b/src/SMESH_SWIG/SMeshHelper.h @@ -21,4 +21,4 @@ #include -std::string BuildSMESHInstanceInternal(bool checkNS); +std::string BuildSMESHInstanceInternal(); diff --git a/src/SMESH_SWIG/SMeshHelper.i b/src/SMESH_SWIG/SMeshHelper.i index 8745d96e0..b73a87db9 100644 --- a/src/SMESH_SWIG/SMeshHelper.i +++ b/src/SMESH_SWIG/SMeshHelper.i @@ -27,8 +27,8 @@ %inline { - std::string BuildSMESHInstance(bool checkNS) + std::string BuildSMESHInstance() { - return BuildSMESHInstanceInternal(checkNS); + return BuildSMESHInstanceInternal(); } } -- 2.39.2