mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
#29456 [EDF] (2022-T1) Finalization of SSL implementation
This commit is contained in:
parent
7242eaf55b
commit
feaddec0f3
@ -40,7 +40,6 @@ SET(SUBDIRS_COMMON
|
|||||||
StdMeshers_I
|
StdMeshers_I
|
||||||
SMESH_PY
|
SMESH_PY
|
||||||
Tools
|
Tools
|
||||||
SalomeSessionless
|
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "SMESHDS_Mesh.hxx"
|
#include "SMESHDS_Mesh.hxx"
|
||||||
#include "SMESHDS_Script.hxx"
|
#include "SMESHDS_Script.hxx"
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
#include "SMESH_Component_Generator.hxx"
|
|
||||||
|
|
||||||
#include "SALOME_NamingService.hxx"
|
#include "SALOME_NamingService.hxx"
|
||||||
#include "SALOME_Fake_NamingService.hxx"
|
#include "SALOME_Fake_NamingService.hxx"
|
||||||
@ -790,9 +789,6 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
|
|||||||
|
|
||||||
if(CORBA::is_nil(aMeshGen.in()))
|
if(CORBA::is_nil(aMeshGen.in()))
|
||||||
{
|
{
|
||||||
Engines::EngineComponent_var isCompoInSSLMode = GetSMESHInstanceHasThis();
|
|
||||||
if( CORBA::is_nil(isCompoInSSLMode) )
|
|
||||||
{
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
long aClientPID = (long)_getpid();
|
long aClientPID = (long)_getpid();
|
||||||
#else
|
#else
|
||||||
@ -818,12 +814,6 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
|
|||||||
CORBA::Long aServerPID = aServerContainer->getPID();
|
CORBA::Long aServerPID = aServerContainer->getPID();
|
||||||
aMeshGen->SetEmbeddedMode((aClientPID == aServerPID) && (aClientHostName == aServerHostName.in()));
|
aMeshGen->SetEmbeddedMode((aClientPID == aServerPID) && (aClientHostName == aServerHostName.in()));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
aMeshGen = SMESH::SMESH_Gen::_narrow(isCompoInSSLMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
theIsEmbeddedMode = aMeshGen->IsEmbeddedMode();
|
theIsEmbeddedMode = aMeshGen->IsEmbeddedMode();
|
||||||
return aMeshGen;
|
return aMeshGen;
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,6 @@
|
|||||||
#include "SMESH_ControlsDef.hxx"
|
#include "SMESH_ControlsDef.hxx"
|
||||||
#include "SMESH_ScalarBarActor.h"
|
#include "SMESH_ScalarBarActor.h"
|
||||||
#include "SMESH_TypeFilter.hxx"
|
#include "SMESH_TypeFilter.hxx"
|
||||||
#include "SMESH_Component_Generator.hxx"
|
|
||||||
|
|
||||||
// SALOME GUI includes
|
// SALOME GUI includes
|
||||||
#include <LightApp_DataOwner.h>
|
#include <LightApp_DataOwner.h>
|
||||||
|
@ -113,7 +113,6 @@ SET(SMESHEngine_HEADERS
|
|||||||
SMESH_PreMeshInfo.hxx
|
SMESH_PreMeshInfo.hxx
|
||||||
SMESH_MeshPartDS.hxx
|
SMESH_MeshPartDS.hxx
|
||||||
SMESH.hxx
|
SMESH.hxx
|
||||||
SMESH_Component_Generator.hxx
|
|
||||||
MG_ADAPT_i.hxx
|
MG_ADAPT_i.hxx
|
||||||
SMESH_Homard_i.hxx
|
SMESH_Homard_i.hxx
|
||||||
)
|
)
|
||||||
@ -143,7 +142,6 @@ SET(SMESHEngine_SOURCES
|
|||||||
SMESH_NoteBook.cxx
|
SMESH_NoteBook.cxx
|
||||||
SMESH_Measurements_i.cxx
|
SMESH_Measurements_i.cxx
|
||||||
SMESH_PreMeshInfo.cxx
|
SMESH_PreMeshInfo.cxx
|
||||||
SMESH_Component_Generator.cxx
|
|
||||||
MG_ADAPT_i.cxx
|
MG_ADAPT_i.cxx
|
||||||
SMESH_Homard_i.cxx
|
SMESH_Homard_i.cxx
|
||||||
)
|
)
|
||||||
|
@ -1,64 +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 "SMESH_Component_Generator.hxx"
|
|
||||||
|
|
||||||
#include "SMESH_Gen_No_Session_i.hxx"
|
|
||||||
#include "SALOME_Container_i.hxx"
|
|
||||||
#include "SALOME_KernelServices.hxx"
|
|
||||||
|
|
||||||
#include "SALOME_Fake_NamingService.hxx"
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
static Engines::EngineComponent_var _unique_compo;
|
|
||||||
|
|
||||||
Engines::EngineComponent_var RetrieveSMESHInstance()
|
|
||||||
{
|
|
||||||
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();
|
|
||||||
//
|
|
||||||
SMESH_Gen_i::SetNS(new SALOME_Fake_NamingService);
|
|
||||||
//
|
|
||||||
SMESH_Gen_No_Session_i *servant = new SMESH_Gen_No_Session_i(orb, poa, conId, "SMESH_inst_2", "SMESH");
|
|
||||||
PortableServer::ObjectId *zeId = servant->getId();
|
|
||||||
CORBA::Object_var zeRef = poa->id_to_reference(*zeId);
|
|
||||||
_unique_compo = Engines::EngineComponent::_narrow(zeRef);
|
|
||||||
}
|
|
||||||
return _unique_compo;
|
|
||||||
}
|
|
||||||
|
|
||||||
Engines::EngineComponent_var GetSMESHInstanceHasThis()
|
|
||||||
{
|
|
||||||
return _unique_compo;
|
|
||||||
}
|
|
@ -1,29 +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 "SMESH.hxx"
|
|
||||||
|
|
||||||
#include "SALOMEconfig.h"
|
|
||||||
|
|
||||||
#include CORBA_SERVER_HEADER(SMESH_Gen)
|
|
||||||
|
|
||||||
SMESH_I_EXPORT Engines::EngineComponent_var RetrieveSMESHInstance();
|
|
||||||
SMESH_I_EXPORT Engines::EngineComponent_var GetSMESHInstanceHasThis();
|
|
@ -21,21 +21,11 @@
|
|||||||
|
|
||||||
#include "SALOME_KernelServices.hxx"
|
#include "SALOME_KernelServices.hxx"
|
||||||
|
|
||||||
#include "SMESH_Component_Generator.hxx"
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include <DriverGMF_Read.hxx>
|
#include <DriverGMF_Read.hxx>
|
||||||
#include <SMESH_MGLicenseKeyGen.hxx>
|
#include <SMESH_MGLicenseKeyGen.hxx>
|
||||||
|
|
||||||
|
|
||||||
std::string BuildSMESHInstanceInternal()
|
|
||||||
{
|
|
||||||
Engines::EngineComponent_var zeRef = RetrieveSMESHInstance();
|
|
||||||
CORBA::String_var ior = KERNEL::getORB()->object_to_string(zeRef);
|
|
||||||
return std::string(ior.in());
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string GetMGLicenseKeyImpl(const char* gmfFile)
|
std::string GetMGLicenseKeyImpl(const char* gmfFile)
|
||||||
{
|
{
|
||||||
smIdType nbVertex, nbEdge, nbFace, nbVol;
|
smIdType nbVertex, nbEdge, nbFace, nbVol;
|
||||||
|
@ -21,6 +21,4 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
std::string BuildSMESHInstanceInternal();
|
|
||||||
|
|
||||||
std::string GetMGLicenseKeyImpl(const char* gmfFile);
|
std::string GetMGLicenseKeyImpl(const char* gmfFile);
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
|
|
||||||
%inline
|
%inline
|
||||||
{
|
{
|
||||||
std::string BuildSMESHInstance()
|
|
||||||
{
|
|
||||||
return BuildSMESHInstanceInternal();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string GetMGLicenseKey(const char* gmfFile)
|
std::string GetMGLicenseKey(const char* gmfFile)
|
||||||
{
|
{
|
||||||
return GetMGLicenseKeyImpl( gmfFile );
|
return GetMGLicenseKeyImpl( gmfFile );
|
||||||
|
@ -1,25 +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
|
|
||||||
SMESH_SalomeSessionless.py
|
|
||||||
MeshJobManager_SalomeSessionless.py
|
|
||||||
)
|
|
||||||
|
|
||||||
SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON} DEF_PERMS)
|
|
@ -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 SMeshPadderHelper
|
|
||||||
padder_ior = SMeshPadderHelper.BuildPadderMeshJobManagerInstance()
|
|
||||||
import MESHJOB
|
|
||||||
import CORBA
|
|
||||||
orb=CORBA.ORB_init([''])
|
|
||||||
padderInst = orb.string_to_object(padder_ior)
|
|
||||||
return padderInst, orb
|
|
@ -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 SMeshHelper
|
|
||||||
smesh_ior = SMeshHelper.BuildSMESHInstance()
|
|
||||||
import SMESH
|
|
||||||
import CORBA
|
|
||||||
orb=CORBA.ORB_init([''])
|
|
||||||
smeshInst = orb.string_to_object(smesh_ior)
|
|
||||||
return smeshInst, orb
|
|
Loading…
Reference in New Issue
Block a user