From: Anthony Geay Date: Mon, 1 Feb 2021 15:24:36 +0000 (+0100) Subject: Question for C++ export : Why getStudyServantVirtual method is requested ? X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=90af165fd6c8d90a1318a172c397950cf598e9b1;p=modules%2Fsmesh.git Question for C++ export : Why getStudyServantVirtual method is requested ? --- diff --git a/src/SMESH_I/SMESH_Gen_No_Session_i.cxx b/src/SMESH_I/SMESH_Gen_No_Session_i.cxx index f7ec1b819..4bf1abf39 100644 --- a/src/SMESH_I/SMESH_Gen_No_Session_i.cxx +++ b/src/SMESH_I/SMESH_Gen_No_Session_i.cxx @@ -38,7 +38,7 @@ GEOM::GEOM_Gen_var SMESH_Gen_No_Session_i::GetGeomEngine( bool isShaper ) return myGeomGen; } -SALOMEDS::Study_var SMESH_Gen_No_Session_i::getStudyServant() const +SALOMEDS::Study_var SMESH_Gen_No_Session_i::getStudyServantVirtual() const { return SALOMEDS::Study::_duplicate(KERNEL::getStudyServantSA()); } diff --git a/src/SMESH_I/SMESH_Gen_No_Session_i.hxx b/src/SMESH_I/SMESH_Gen_No_Session_i.hxx index 483c5d4d8..e79407dff 100644 --- a/src/SMESH_I/SMESH_Gen_No_Session_i.hxx +++ b/src/SMESH_I/SMESH_Gen_No_Session_i.hxx @@ -30,6 +30,6 @@ public: const char* instanceName, const char* interfaceName); GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper ) override; - SALOMEDS::Study_var getStudyServant() const override; + SALOMEDS::Study_var getStudyServantVirtual() const override; SALOME_ModuleCatalog::ModuleCatalog_var getModuleCatalog() const override; }; diff --git a/src/SMESH_I/SMESH_Gen_Session_i.cxx b/src/SMESH_I/SMESH_Gen_Session_i.cxx index 13e1c5955..f2577d7fe 100644 --- a/src/SMESH_I/SMESH_Gen_Session_i.cxx +++ b/src/SMESH_I/SMESH_Gen_Session_i.cxx @@ -38,7 +38,7 @@ GEOM::GEOM_Gen_var SMESH_Gen_Session_i::GetGeomEngine( bool isShaper ) return myGeomGen; } -SALOMEDS::Study_var SMESH_Gen_Session_i::getStudyServant() const +SALOMEDS::Study_var SMESH_Gen_Session_i::getStudyServantVirtual() const { return SALOMEDS::Study::_duplicate(KERNEL::getStudyServant()); } diff --git a/src/SMESH_I/SMESH_Gen_Session_i.hxx b/src/SMESH_I/SMESH_Gen_Session_i.hxx index 7971a9008..af69571e8 100644 --- a/src/SMESH_I/SMESH_Gen_Session_i.hxx +++ b/src/SMESH_I/SMESH_Gen_Session_i.hxx @@ -31,6 +31,6 @@ public: const char* interfaceName); GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper ) override; // Get the SALOMEDS::Study from naming service - SALOMEDS::Study_var getStudyServant() const override; + SALOMEDS::Study_var getStudyServantVirtual() const override; SALOME_ModuleCatalog::ModuleCatalog_var getModuleCatalog() const override; }; diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index 8a4309dbb..c78d57bfd 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -108,10 +108,11 @@ public: // Get SALOME_LifeCycleCORBA object static SALOME_LifeCycleCORBA* GetLCC(); // Retrieve and get GEOM engine reference - virtual GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper ) = 0; static GEOM::GEOM_Gen_var GetGeomEngine( GEOM::GEOM_Object_ptr ); // Retrieve Study depending on Session / Standalone mode - virtual SALOMEDS::Study_var getStudyServant() const = 0; + virtual GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper ) = 0; + SALOMEDS::Study_var getStudyServant() const { return this->getStudyServantVirtual(); } + virtual SALOMEDS::Study_var getStudyServantVirtual() const = 0 ; virtual SALOME_ModuleCatalog::ModuleCatalog_var getModuleCatalog() const = 0; SALOMEDS::SObject_ptr publish(CORBA::Object_ptr theIOR, SALOMEDS::SObject_ptr theFatherObject,