mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-23 21:17:56 +05:00
Move Python Study ref creation to KERNEL
This commit is contained in:
parent
9db9db05b9
commit
76da6e3859
@ -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());
|
||||
}
|
||||
|
@ -22,4 +22,3 @@
|
||||
#include <string>
|
||||
|
||||
std::string BuildSMESHInstanceInternal(bool checkNS);
|
||||
std::string GetSessionInstanceInternal();
|
||||
|
@ -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())
|
||||
|
||||
%}
|
Loading…
x
Reference in New Issue
Block a user