]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 1 Feb 2021 14:53:54 +0000 (15:53 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 1 Feb 2021 14:53:54 +0000 (15:53 +0100)
src/SMESH_I/SMESH_Gen_No_Session_i.cxx
src/SMESH_I/SMESH_Gen_No_Session_i.hxx
src/SMESH_I/SMESH_Gen_Session_i.cxx
src/SMESH_I/SMESH_Gen_Session_i.hxx
src/SMESH_I/SMESH_Gen_i.hxx
src/SMESH_I/SMESH_Gen_i_1.cxx

index f4f1f7877da07b42339920ee2f8c37c1411f5a8d..f7ec1b819e1e968979c140a39aef39687deb392e 100644 (file)
@@ -20,6 +20,7 @@
 #include "SMESH_Gen_No_Session_i.hxx"
 #include "SALOMEDS_Study_i.hxx"
 #include "SALOME_KernelServices.hxx"
+#include "SALOME_ModuleCatalog_impl.hxx"
 
 SMESH_Gen_No_Session_i::SMESH_Gen_No_Session_i( CORBA::ORB_ptr orb,
                                                 PortableServer::POA_ptr   poa,
@@ -41,3 +42,9 @@ SALOMEDS::Study_var SMESH_Gen_No_Session_i::getStudyServant() const
 {
   return SALOMEDS::Study::_duplicate(KERNEL::getStudyServantSA());
 }
+
+SALOME_ModuleCatalog::ModuleCatalog_var SMESH_Gen_No_Session_i::getModuleCatalog() const
+{
+  SALOME_ModuleCatalog::ModuleCatalog_var aCat = KERNEL::getModuleComponentServantSA();
+  return aCat;
+}
index da65157a8c4a0ac100430dd5052f44c38ba8a09e..483c5d4d859dbaaff3b6ae009491bbe595b31c94 100644 (file)
@@ -31,4 +31,5 @@ public:
                const char*               interfaceName);
   GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper ) override;
   SALOMEDS::Study_var getStudyServant() const override;
+  SALOME_ModuleCatalog::ModuleCatalog_var getModuleCatalog() const override;
 };
index e15c8ea7e1e2d73cd8c87ef327d7079e87c2d140..13e1c59558d88d676280362b001fde1050a77737 100644 (file)
@@ -43,6 +43,12 @@ SALOMEDS::Study_var SMESH_Gen_Session_i::getStudyServant() const
   return SALOMEDS::Study::_duplicate(KERNEL::getStudyServant());
 }
 
+SALOME_ModuleCatalog::ModuleCatalog_var SMESH_Gen_Session_i::getModuleCatalog() const
+{
+  SALOME_ModuleCatalog::ModuleCatalog_var aCat = SALOME_ModuleCatalog::ModuleCatalog::_narrow( GetNS()->Resolve("/Kernel/ModulCatalog") );
+  return aCat;
+}
+
 extern "C"
 { SMESH_I_EXPORT
   PortableServer::ObjectId* SMESHEngine_factory( CORBA::ORB_ptr            orb,
index 4ce0678236248a7a6517d363b0bac1acc1aa2a71..7971a9008feca2129714efa3eeeba84ba803eea5 100644 (file)
@@ -32,4 +32,5 @@ public:
   GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper ) override;
   // Get the SALOMEDS::Study from naming service
   SALOMEDS::Study_var getStudyServant() const override;
+  SALOME_ModuleCatalog::ModuleCatalog_var getModuleCatalog() const override;
 };
index 580340ab974d0e626e2cb5d1ce782b3fd27f5ff8..8a4309dbbc951e5f9c2a6619298e1fbb3d5c8e76 100644 (file)
@@ -35,6 +35,7 @@
 #include CORBA_CLIENT_HEADER(GEOM_Gen)
 #include CORBA_CLIENT_HEADER(SALOMEDS)
 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
 
 #include "SMESH_Gen.hxx"
 #include "SMESH_Mesh_i.hxx"
@@ -111,6 +112,7 @@ public:
   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 SALOME_ModuleCatalog::ModuleCatalog_var getModuleCatalog() const = 0;
   SALOMEDS::SObject_ptr publish(CORBA::Object_ptr     theIOR,
                                 SALOMEDS::SObject_ptr theFatherObject,
                                 const int             theTag = 0,
index 26946cc2838f163010dfa5a27d96b7c798e9aa2f..672477ccc89d3c2d1db25e68e06a326f50632859 100644 (file)
@@ -34,8 +34,6 @@
 #include "SMESH_Mesh_i.hxx"
 #include "SMESH_subMesh_i.hxx"
 
-#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
-
 #include <utilities.h>
 #include <Utils_ExceptHandlers.hxx>
 #include <SALOMEDS_wrap.hxx>
@@ -577,7 +575,7 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent()
 
   // If component for this SMESH engine does not exist in the study, create it
 
-  SALOME_ModuleCatalog::ModuleCatalog_var aCat = KERNEL::getModuleComponentServantSA();
+  SALOME_ModuleCatalog::ModuleCatalog_var aCat = this->getModuleCatalog();
   if ( CORBA::is_nil( aCat ) )
     return father._retn();