#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,
{
CORBA::Object_var temp = KERNEL::RetrieveCompo(isShaper ? "SHAPERSTUDY" : "GEOM");
myGeomGen = GEOM::GEOM_Gen::_narrow( temp );
+ myNS = new SALOME_Fake_NamingService;
return myGeomGen;
}
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;
*/
//=============================================================================
-SALOME_NamingService* SMESH_Gen_i::GetNS()
+SALOME_NamingService_Abstract* SMESH_Gen_i::GetNS()
{
if ( myNS == NULL ) {
myNS = SINGLETON_<SALOME_NamingService>::Instance();
// 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 ) ;
// 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
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