Move Python Study ref creation to KERNEL

This commit is contained in:
Anthony Geay 2021-01-16 07:36:22 +01:00
parent 9db9db05b9
commit 76da6e3859
3 changed files with 0 additions and 26 deletions

View File

@ -22,11 +22,9 @@
#include "SMESH_Gen_i.hxx"
#include "SALOME_Container_i.hxx"
#include "SALOME_KernelServices.hxx"
#include "SALOMEDS_Study_i.hxx"
#include <cstring>
std::string BuildSMESHInstanceInternal(bool checkNS)
{
CORBA::ORB_var orb;
@ -50,11 +48,3 @@ std::string BuildSMESHInstanceInternal(bool checkNS)
CORBA::String_var ior = orb->object_to_string(zeRef);
return std::string(ior.in());
}
std::string GetSessionInstanceInternal()
{
SALOMEDS::Study_var study = KERNEL::getStudyServantSA();
CORBA::ORB_ptr orb = KERNEL::getORB();
CORBA::String_var ior = orb->object_to_string(study);
return std::string(ior.in());
}

View File

@ -22,4 +22,3 @@
#include <string>
std::string BuildSMESHInstanceInternal(bool checkNS);
std::string GetSessionInstanceInternal();

View File

@ -31,19 +31,4 @@
{
return BuildSMESHInstanceInternal(checkNS);
}
std::string GetSessionInstance()
{
return GetSessionInstanceInternal();
}
}
%pythoncode %{
def myStudy():
import SALOMEDS
import CORBA
orb=CORBA.ORB_init([''])
return orb.string_to_object(GetSessionInstance())
%}