From: Anthony Geay Date: Sat, 16 Jan 2021 06:36:22 +0000 (+0100) Subject: Move Python Study ref creation to KERNEL X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=76da6e38597563957f22bdf5012ddfb20c03a351;p=modules%2Fsmesh.git Move Python Study ref creation to KERNEL --- diff --git a/src/SMESH_SWIG/SMeshHelper.cxx b/src/SMESH_SWIG/SMeshHelper.cxx index 4b7b2b275..78f24d2d1 100644 --- a/src/SMESH_SWIG/SMeshHelper.cxx +++ b/src/SMESH_SWIG/SMeshHelper.cxx @@ -22,11 +22,9 @@ #include "SMESH_Gen_i.hxx" #include "SALOME_Container_i.hxx" #include "SALOME_KernelServices.hxx" -#include "SALOMEDS_Study_i.hxx" #include - 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()); -} diff --git a/src/SMESH_SWIG/SMeshHelper.h b/src/SMESH_SWIG/SMeshHelper.h index dd3d5dabe..bef5532ca 100644 --- a/src/SMESH_SWIG/SMeshHelper.h +++ b/src/SMESH_SWIG/SMeshHelper.h @@ -22,4 +22,3 @@ #include std::string BuildSMESHInstanceInternal(bool checkNS); -std::string GetSessionInstanceInternal(); diff --git a/src/SMESH_SWIG/SMeshHelper.i b/src/SMESH_SWIG/SMeshHelper.i index 63b7c7e77..8745d96e0 100644 --- a/src/SMESH_SWIG/SMeshHelper.i +++ b/src/SMESH_SWIG/SMeshHelper.i @@ -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()) - -%} \ No newline at end of file