From b5ad174931b0ea26daa64b89517de31450860195 Mon Sep 17 00:00:00 2001 From: Yoann Audouin Date: Thu, 23 Mar 2023 11:15:45 +0100 Subject: [PATCH] Missing files --- src/SMESH_I/SMESH_ParallelMesh_i.cxx | 107 +++++++++++++++++++++++++ src/SMESH_I/SMESH_ParallelMesh_i.hxx | 51 ++++++++++++ src/SMESH_I/SMESH_SequentialMesh_i.hxx | 50 ++++++++++++ 3 files changed, 208 insertions(+) create mode 100644 src/SMESH_I/SMESH_ParallelMesh_i.cxx create mode 100644 src/SMESH_I/SMESH_ParallelMesh_i.hxx create mode 100644 src/SMESH_I/SMESH_SequentialMesh_i.hxx diff --git a/src/SMESH_I/SMESH_ParallelMesh_i.cxx b/src/SMESH_I/SMESH_ParallelMesh_i.cxx new file mode 100644 index 000000000..92651d9ee --- /dev/null +++ b/src/SMESH_I/SMESH_ParallelMesh_i.cxx @@ -0,0 +1,107 @@ +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// +// File : SMESH_ParallelMesh_i.cxx +// Author : Yoann AUDOUIN, EDF +// Module : SMESH + +#include "SMESH_ParallelMesh_i.hxx" + +#include "SMESH_Gen_i.hxx" + + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + +//============================================================================= +/*! + * Constructor + */ +//============================================================================= + +SMESH_ParallelMesh_i::SMESH_ParallelMesh_i( PortableServer::POA_ptr thePOA, + SMESH_Gen_i* gen_i ) +: SMESH_Mesh_i(thePOA, gen_i) +{ +} + +//============================================================================= +/*! + * Destructor + */ +//============================================================================= + +SMESH_ParallelMesh_i::~SMESH_ParallelMesh_i() +{ +} + +//============================================================================= +namespace +{ + //!< implementation of struct used to call methods of SMESH_Mesh_i from SMESH_Mesh + // issue 0020918: groups removal is caused by hyp modification + // issue 0021208: to forget not loaded mesh data at hyp modification + struct TCallUp_i : public SMESH_ParallelMesh::TCallUp + { + SMESH_ParallelMesh_i* _mesh; + TCallUp_i(SMESH_ParallelMesh_i* mesh):_mesh(mesh) {} + void RemoveGroup (const int theGroupID) override { _mesh->removeGroup( theGroupID ); } + void HypothesisModified( int hypID, + bool updIcons) override { _mesh->onHypothesisModified( hypID, + updIcons ); } + void Load () override { _mesh->Load(); } + bool IsLoaded() override { return _mesh->IsLoaded(); } + TopoDS_Shape GetShapeByEntry(const std::string& entry) override + { + GEOM::GEOM_Object_var go = SMESH_Gen_i::GetGeomObjectByEntry( entry ); + return SMESH_Gen_i::GeomObjectToShape( go ); + } + }; +} + +//================================================================================ +/*! + * \brief Set mesh implementation + */ +//================================================================================ + +void SMESH_ParallelMesh_i::SetImpl(::SMESH_ParallelMesh * impl) +{ + if(MYDEBUG) MESSAGE("SMESH_ParallelMesh_i::SetImpl"); + _impl = impl; + if ( _impl ) + _impl->SetCallUp( new TCallUp_i(this)); +} + +//============================================================================= +/*! + * Return a mesh implementation + */ +//============================================================================= + +::SMESH_ParallelMesh & SMESH_ParallelMesh_i::GetImpl() +{ + if(MYDEBUG) MESSAGE("SMESH_ParallelMesh_i::GetImpl()"); + return *_impl; +} \ No newline at end of file diff --git a/src/SMESH_I/SMESH_ParallelMesh_i.hxx b/src/SMESH_I/SMESH_ParallelMesh_i.hxx new file mode 100644 index 000000000..0ac0bcfd0 --- /dev/null +++ b/src/SMESH_I/SMESH_ParallelMesh_i.hxx @@ -0,0 +1,51 @@ +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// +// File : SMESH_ParallelMesh_i.hxx +// Author : Yoann AUDOUIN, EDF +// Module : SMESH + +#ifndef _SMESH_PARALLELMESH_I_HXX_ +#define _SMESH_PARALLELMESH_I_HXX_ + +#include "SMESH.hxx" + +#include "SMESH_Hypothesis.hxx" +#include "SMESH_Mesh_i.hxx" + +#include +#include +#include CORBA_SERVER_HEADER(SMESH_Mesh) + +#include + +class SMESH_I_EXPORT SMESH_ParallelMesh_i: + public virtual POA_SMESH::SMESH_ParallelMesh, + public virtual SMESH_Mesh_i +{ + SMESH_ParallelMesh_i( PortableServer::POA_ptr thePOA, + SMESH_Gen_i* myGen_i ):SMESH_Mesh_i(thePOA, myGen_i){}; + + virtual ~SMESH_ParallelMesh_i(); + +}; + +#endif diff --git a/src/SMESH_I/SMESH_SequentialMesh_i.hxx b/src/SMESH_I/SMESH_SequentialMesh_i.hxx new file mode 100644 index 000000000..22cf43441 --- /dev/null +++ b/src/SMESH_I/SMESH_SequentialMesh_i.hxx @@ -0,0 +1,50 @@ +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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 +// +// File : SMESH_SequentialMesh_i.hxx +// Author : Yoann AUDOUIN, EDF +// Module : SMESH + +#ifndef _SMESH_SEQUENTIALMESH_I_HXX_ +#define _SMESH_SEQUENTIALMESH_I_HXX_ + +#include "SMESH.hxx" + +#include "SMESH_SequentialMesh.hxx" +#include "SMESH_Mesh_i.hxx" +#include "SMESH_Gen_i.hxx" + +#include +#include +#include CORBA_SERVER_HEADER(SMESH_Mesh) + +class SMESH_I_EXPORT SMESH_SequentialMesh_i: + public virtual POA_SMESH::SMESH_SequentialMesh, + public virtual SMESH_Mesh_i +{ + SMESH_SequentialMesh_i( PortableServer::POA_ptr thePOA, + SMESH_Gen_i* myGen_i ):SMESH_Mesh_i(thePOA, myGen_i){}; + + virtual ~SMESH_SequentialMesh_i(); + +}; + +#endif