mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-23 21:17:56 +05:00
WIP
This commit is contained in:
parent
a489fbfb40
commit
75f7ed9579
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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,
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user