From: Anthony Geay Date: Tue, 23 Feb 2021 10:15:59 +0000 (+0100) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1d2723102d6c0e8c7c8f380e8835590c01b86bfb;p=modules%2Fsmesh.git WIP --- diff --git a/src/SMESH_I/SMESH_Gen_No_Session_i.cxx b/src/SMESH_I/SMESH_Gen_No_Session_i.cxx index 4bf1abf39..e548aead0 100644 --- a/src/SMESH_I/SMESH_Gen_No_Session_i.cxx +++ b/src/SMESH_I/SMESH_Gen_No_Session_i.cxx @@ -20,6 +20,7 @@ #include "SMESH_Gen_No_Session_i.hxx" #include "SALOMEDS_Study_i.hxx" #include "SALOME_KernelServices.hxx" +#include "SALOME_Fake_NamingService.hxx" #include "SALOME_ModuleCatalog_impl.hxx" SMESH_Gen_No_Session_i::SMESH_Gen_No_Session_i( CORBA::ORB_ptr orb, @@ -35,6 +36,7 @@ GEOM::GEOM_Gen_var SMESH_Gen_No_Session_i::GetGeomEngine( bool isShaper ) { CORBA::Object_var temp = KERNEL::RetrieveCompo(isShaper ? "SHAPERSTUDY" : "GEOM"); myGeomGen = GEOM::GEOM_Gen::_narrow( temp ); + myNS = new SALOME_Fake_NamingService; return myGeomGen; } diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 66f8570a3..e89466cfb 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -164,9 +164,9 @@ static int MYDEBUG = 0; GEOM::GEOM_Gen_var SMESH_Gen_i::myGeomGen; CORBA::ORB_var SMESH_Gen_i::myOrb; PortableServer::POA_var SMESH_Gen_i::myPoa; -SALOME_NamingService* SMESH_Gen_i::myNS = NULL; -SALOME_LifeCycleCORBA* SMESH_Gen_i::myLCC = NULL; -SMESH_Gen_i* SMESH_Gen_i::mySMESHGen = NULL; +SALOME_NamingService_Abstract* SMESH_Gen_i::myNS = nullptr; +SALOME_LifeCycleCORBA* SMESH_Gen_i::myLCC = nullptr; +SMESH_Gen_i* SMESH_Gen_i::mySMESHGen = nullptr; const int nbElemPerDiagonal = 10; @@ -245,7 +245,7 @@ CORBA::Object_var SMESH_Gen_i::SObjectToObject( SALOMEDS::SObject_ptr theSObject */ //============================================================================= -SALOME_NamingService* SMESH_Gen_i::GetNS() +SALOME_NamingService_Abstract* SMESH_Gen_i::GetNS() { if ( myNS == NULL ) { myNS = SINGLETON_::Instance(); @@ -340,7 +340,7 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb, // SMESH_Gen_i::SetEmbeddedMode(), have wrong IsEmbeddedMode flag if(checkNS) { - if ( SALOME_NamingService* ns = GetNS() ) + if ( SALOME_NamingService_Abstract* ns = GetNS() ) { CORBA::Object_var obj = ns->Resolve( "/Kernel/Session" ); SALOME::Session_var session = SALOME::Session::_narrow( obj ) ; diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index c78d57bfd..5a5ba6fad 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -104,7 +104,7 @@ public: // Get SMESH module's POA object static PortableServer::POA_var GetPOA() { return myPoa;} // Get Naming Service object - static SALOME_NamingService* GetNS(); + static SALOME_NamingService_Abstract* GetNS(); // Get SALOME_LifeCycleCORBA object static SALOME_LifeCycleCORBA* GetLCC(); // Retrieve and get GEOM engine reference @@ -646,10 +646,10 @@ private: protected: static GEOM::GEOM_Gen_var myGeomGen; + static SALOME_NamingService_Abstract* myNS; // Naming Service private: static CORBA::ORB_var myOrb; // ORB reference static PortableServer::POA_var myPoa; // POA reference - static SALOME_NamingService* myNS; // Naming Service static SALOME_LifeCycleCORBA* myLCC; // Life Cycle CORBA static SMESH_Gen_i* mySMESHGen; // Point to last created instance of the class ::SMESH_Gen myGen; // SMESH_Gen local implementation