From: nri Date: Tue, 20 May 2003 13:05:14 +0000 (+0000) Subject: NRI : VISU dependence. X-Git-Tag: V1_4_0~111 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aebe7416ee5292162317fdc3ceb9a81bf179851a;p=modules%2Fkernel.git NRI : VISU dependence. --- diff --git a/idl/SALOME_Session.idl b/idl/SALOME_Session.idl index 81c95996c..9601cb102 100644 --- a/idl/SALOME_Session.idl +++ b/idl/SALOME_Session.idl @@ -9,6 +9,7 @@ //***//#include "VISU_Gen.idl" +#include "SALOME_Component.idl" /*! \defgroup Kernel SALOME KERNEL module */ @@ -69,6 +70,7 @@ module SALOME */ void GetInterface(); //***// VISU::VISU_Gen GetVisuGen(); + Engines::Component GetVisuComponent(); /*! Stops the %Session (It must be idle) diff --git a/src/Session/SALOME_Session_i.cxx b/src/Session/SALOME_Session_i.cxx index 49acc5897..258842f4b 100644 --- a/src/Session/SALOME_Session_i.cxx +++ b/src/Session/SALOME_Session_i.cxx @@ -51,6 +51,18 @@ SALOME_Session_i::SALOME_Session_i(int argc, char ** argv, CORBA::ORB_ptr orb, P //***// return VISU::VISU_Gen::_nil(); //***//} +typedef Engines::Component_ptr VisuGen(CORBA::ORB_var,PortableServer::POA_ptr,QMutex*); +Engines::Component_ptr SALOME_Session_i::GetVisuComponent() { + MESSAGE("SALOME_Session_i::GetVisuGen"); + OSD_SharedLibrary visuSharedLibrary("libVISUEngine.so"); + if(visuSharedLibrary.DlOpen(OSD_RTLD_LAZY)) + if(OSD_Function osdFun = visuSharedLibrary.DlSymb("GetVisuGen")) + return ((VisuGen (*)) osdFun)(_orb,_poa,&_GUIMutex); + + MESSAGE ( "nil" ) + return Engines::Component::_nil(); +} + //============================================================================= /*! ~SALOME_Session_i * destructor diff --git a/src/Session/SALOME_Session_i.hxx b/src/Session/SALOME_Session_i.hxx index 15ae3696c..ef7a55f08 100644 --- a/src/Session/SALOME_Session_i.hxx +++ b/src/Session/SALOME_Session_i.hxx @@ -13,6 +13,7 @@ #include #include +#include CORBA_SERVER_HEADER(SALOME_Component) //***//#include CORBA_SERVER_HEADER(VISU_Gen) #include CORBA_SERVER_HEADER(SALOME_Session) class SALOME_NamingService; @@ -30,6 +31,7 @@ public: //! Launch Graphical User Interface void GetInterface(); //***//VISU::VISU_Gen_ptr GetVisuGen(); + Engines::Component_ptr GetVisuComponent(); //! Stop the Session (must be idle): kill servant & server void StopSession();