From d1fba3576de239ab0f10b5095b9da91d22f4d042 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 14 Apr 2022 18:51:08 +0300 Subject: [PATCH] #29456 [EDF] (2022-T1) Finalization of SSL implementation --- src/CMakeLists.txt | 1 - src/GEOMGUI/GeometryGUI.cxx | 1 - src/GEOM_I/CMakeLists.txt | 2 - src/GEOM_I/GEOM_Component_Generator.cxx | 57 ------------------- src/GEOM_I/GEOM_Component_Generator.hxx | 28 --------- src/GEOM_SWIG/CMakeLists.txt | 22 ------- src/GEOM_SWIG/GeomHelper.cxx | 31 ---------- src/GEOM_SWIG/GeomHelper.h | 22 ------- src/GEOM_SWIG/GeomHelper.i | 27 --------- src/SalomeSessionless/CMakeLists.txt | 24 -------- .../GEOM_SalomeSessionless.py | 28 --------- 11 files changed, 243 deletions(-) delete mode 100644 src/GEOM_I/GEOM_Component_Generator.cxx delete mode 100644 src/GEOM_I/GEOM_Component_Generator.hxx delete mode 100644 src/GEOM_SWIG/GeomHelper.cxx delete mode 100644 src/GEOM_SWIG/GeomHelper.h delete mode 100644 src/GEOM_SWIG/GeomHelper.i delete mode 100644 src/SalomeSessionless/CMakeLists.txt delete mode 100644 src/SalomeSessionless/GEOM_SalomeSessionless.py diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aa3df20c3..5b1b41d7b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 ) ## diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 9f02f82ee..31bbe1716 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -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" diff --git a/src/GEOM_I/CMakeLists.txt b/src/GEOM_I/CMakeLists.txt index 35c1e58c2..176e86662 100644 --- a/src/GEOM_I/CMakeLists.txt +++ b/src/GEOM_I/CMakeLists.txt @@ -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 --- diff --git a/src/GEOM_I/GEOM_Component_Generator.cxx b/src/GEOM_I/GEOM_Component_Generator.cxx deleted file mode 100644 index 3cc523418..000000000 --- a/src/GEOM_I/GEOM_Component_Generator.cxx +++ /dev/null @@ -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 - -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; -} diff --git a/src/GEOM_I/GEOM_Component_Generator.hxx b/src/GEOM_I/GEOM_Component_Generator.hxx deleted file mode 100644 index dc8ecaf3b..000000000 --- a/src/GEOM_I/GEOM_Component_Generator.hxx +++ /dev/null @@ -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(); diff --git a/src/GEOM_SWIG/CMakeLists.txt b/src/GEOM_SWIG/CMakeLists.txt index 1cb8aeec3..a1a8c96b6 100644 --- a/src/GEOM_SWIG/CMakeLists.txt +++ b/src/GEOM_SWIG/CMakeLists.txt @@ -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) diff --git a/src/GEOM_SWIG/GeomHelper.cxx b/src/GEOM_SWIG/GeomHelper.cxx deleted file mode 100644 index 9633a001b..000000000 --- a/src/GEOM_SWIG/GeomHelper.cxx +++ /dev/null @@ -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()); -} diff --git a/src/GEOM_SWIG/GeomHelper.h b/src/GEOM_SWIG/GeomHelper.h deleted file mode 100644 index 09bb19422..000000000 --- a/src/GEOM_SWIG/GeomHelper.h +++ /dev/null @@ -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 - -std::string BuildGEOMInstance(); diff --git a/src/GEOM_SWIG/GeomHelper.i b/src/GEOM_SWIG/GeomHelper.i deleted file mode 100644 index 64d70cad9..000000000 --- a/src/GEOM_SWIG/GeomHelper.i +++ /dev/null @@ -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(); -} diff --git a/src/SalomeSessionless/CMakeLists.txt b/src/SalomeSessionless/CMakeLists.txt deleted file mode 100644 index d833ddb14..000000000 --- a/src/SalomeSessionless/CMakeLists.txt +++ /dev/null @@ -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) diff --git a/src/SalomeSessionless/GEOM_SalomeSessionless.py b/src/SalomeSessionless/GEOM_SalomeSessionless.py deleted file mode 100644 index b6f539674..000000000 --- a/src/SalomeSessionless/GEOM_SalomeSessionless.py +++ /dev/null @@ -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 -- 2.39.2