#29456 [EDF] (2022-T1) Finalization of SSL implementation

This commit is contained in:
rnv 2022-04-14 18:51:08 +03:00
parent e3980c1c79
commit d1fba3576d
11 changed files with 0 additions and 243 deletions

View File

@ -25,7 +25,6 @@ SET(SUBDIRS_COMMON
GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
AdvancedEngine
STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin Tools
SalomeSessionless
)
##

View File

@ -41,7 +41,6 @@
#include "GEOMUtils_XmlHandler.hxx"
#include "GEOMGUI_AnnotationMgr.h"
#include "GEOMGUI_TextTreeSelector.h"
#include "GEOM_Component_Generator.hxx"
#include "GEOM_Actor.h"

View File

@ -82,7 +82,6 @@ SET(GEOMEngine_HEADERS
GEOM_Gen_No_Session_i.hh
GEOM_GEOM_I.hxx
GEOM_wrap.hxx
GEOM_Component_Generator.hxx
)
# --- sources ---
@ -108,7 +107,6 @@ SET(GEOMEngine_SOURCES
GEOM_Gen_Session_i.cc
GEOM_Gen_No_Session_i.cc
GEOM_DumpPython.cc
GEOM_Component_Generator.cxx
)
# --- rules ---

View File

@ -1,57 +0,0 @@
// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "GEOM_Component_Generator.hxx"
#include "GEOM_Gen_No_Session_i.hh"
#include "SALOME_Container_i.hxx"
#include "SALOME_KernelServices.hxx"
#include <cstring>
static Engines::EngineComponent_var _unique_compo;
Engines::EngineComponent_var RetrieveGEOMInstance()
{
constexpr char COMPO_NAME[]="GEOM";
if (CORBA::is_nil(_unique_compo))
{
CORBA::ORB_var orb;
{
int argc(0);
orb = CORBA::ORB_init(argc, nullptr);
}
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
PortableServer::POAManager_var pman = poa->the_POAManager();
CORBA::PolicyList policies;
policies.length(0);
auto *cont(KERNEL::getContainerSA());
PortableServer::ObjectId *conId(cont->getCORBAId());
//
pman->activate();
//
GEOM_Gen_No_Session_i *servant = new GEOM_Gen_No_Session_i(orb, poa, conId, "GEOM_inst_2", COMPO_NAME);
PortableServer::ObjectId *zeId = servant->getId();
CORBA::Object_var zeRef = poa->id_to_reference(*zeId);
KERNEL::RegisterCompo(COMPO_NAME,zeRef);
_unique_compo = Engines::EngineComponent::_narrow(zeRef);
}
return _unique_compo;
}

View File

@ -1,28 +0,0 @@
// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#pragma once
#include "GEOM_GEOM_I.hxx"
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(GEOM_Gen)
GEOM_I_EXPORT Engines::EngineComponent_var RetrieveGEOMInstance();

View File

@ -17,8 +17,6 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
include(${SWIG_USE_FILE})
include_directories(
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/GEOMUtils
@ -132,26 +130,6 @@ SET(_shared_SCRIPTS
# additional preprocessor / compiler flags
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} )
SET(GeomHelper_HEADERS GeomHelper.h GeomHelper.i)
SET(GeomHelper_SOURCES GeomHelper.cxx ${GeomHelper_HEADERS})
SET_SOURCE_FILES_PROPERTIES(GeomHelper.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(GeomHelper.i PROPERTIES SWIG_FLAGS "-py3")
SET_SOURCE_FILES_PROPERTIES(GeomHelper_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
SET(_swig_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/GeomHelper.py )
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
SWIG_ADD_MODULE(GeomHelper python ${GeomHelper_SOURCES})
ELSE()
SWIG_ADD_LIBRARY(GeomHelper LANGUAGE python SOURCES ${GeomHelper_SOURCES})
ENDIF()
SWIG_LINK_LIBRARIES(GeomHelper ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} GEOMEngine ${KERNEL_SalomeKernelHelpers} ${KERNEL_SalomeDS} )
SWIG_CHECK_GENERATION(GeomHelper)
IF(WIN32)
SET_TARGET_PROPERTIES(_GeomHelper PROPERTIES DEBUG_OUTPUT_NAME _GeomHelper_d)
ENDIF(WIN32)
install(TARGETS _GeomHelper DESTINATION ${SALOME_INSTALL_LIBS})
install(FILES ${GeomHelper_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_BINS} EXTRA_DPYS "${SWIG_MODULE_GeomHelper_REAL_NAME}")
# --- rules ---
SALOME_INSTALL_SCRIPTS("${_other_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_DATA} DEF_PERMS)

View File

@ -1,31 +0,0 @@
// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "GeomHelper.h"
#include "SALOME_KernelServices.hxx"
#include "GEOM_Component_Generator.hxx"
std::string BuildGEOMInstance()
{
Engines::EngineComponent_var zeRef = RetrieveGEOMInstance();
CORBA::String_var ior = KERNEL::getORB()->object_to_string(zeRef);
return std::string(ior.in());
}

View File

@ -1,22 +0,0 @@
// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <string>
std::string BuildGEOMInstance();

View File

@ -1,27 +0,0 @@
// Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
%module GeomHelper
%include "std_string.i"
%inline
{
std::string BuildGEOMInstance();
}

View File

@ -1,24 +0,0 @@
# Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
SET(_bin_SCRIPTS
GEOM_SalomeSessionless.py
)
SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON} DEF_PERMS)

View File

@ -1,28 +0,0 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
def buildInstance(orb):
import GeomHelper
geom_ior = GeomHelper.BuildGEOMInstance()
import GEOM
import CORBA
orb=CORBA.ORB_init([''])
geom = orb.string_to_object(geom_ior)
return geom, orb