]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Added method GetStudy, which return a CORBA SALOMEDS::Study
authorsrn <srn@opencascade.com>
Fri, 8 Apr 2005 08:58:08 +0000 (08:58 +0000)
committersrn <srn@opencascade.com>
Fri, 8 Apr 2005 08:58:08 +0000 (08:58 +0000)
src/SALOMEDS/SALOMEDS_Study.cxx
src/SALOMEDS/SALOMEDS_Study.hxx

index 58bbd189a3a7c218ffa9dffb125b32402164f874..ac5b4c0639232c80460aec1d6ef54a071dbfb00e 100644 (file)
@@ -23,6 +23,7 @@ using namespace std;
 #include "SALOMEDSImpl_UseCaseBuilder.hxx"
 
 #include "SALOMEDS_Driver_i.hxx"
+#include "SALOMEDS_Study_i.hxx"
 
 #include <TCollection_AsciiString.hxx> 
 #include <TColStd_HSequenceOfAsciiString.hxx>
@@ -532,3 +533,17 @@ void SALOMEDS_Study::init_orb()
   ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
   _orb = init(0 , 0 ) ;     
 }
+
+SALOMEDS::Study_ptr SALOMEDS_Study::GetStudy()
+{
+   if(_isLocal) {
+     SALOMEDS_Study_i *Study_servant = new SALOMEDS_Study_i(_local_impl, _orb);
+     SALOMEDS::Study_var Study = Study_servant->_this();
+     return Study;
+   }
+   else {
+     return _corba_impl;
+   }
+   
+   return SALOMEDS::Study::_nil();
+}
index 68f390ad73bc38841ea2d5169e33518cf7e766a6..686c3f8dcc112aed4211c9e02cba371f89aa7fd1 100644 (file)
@@ -80,6 +80,8 @@ public:
   std::string ConvertObjectToIOR(CORBA::Object_ptr theObject);
   CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR);     
 
+  SALOMEDS::Study_ptr GetStudy();
+
 private:
   void init_orb();