X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MEDSupport_i.cxx;h=56f3b73ebeec67e8f97815a7594bdc38580703bc;hp=0db6c4095e9300ff7ef67e836828f3d58eacb9ba;hb=127d2277c6a516d0e9fadd77b4ef0b0c6286cf17;hpb=341338ff083c4c6f4ab2839c626833818c2b6c42 diff --git a/src/SMESH_I/SMESH_MEDSupport_i.cxx b/src/SMESH_I/SMESH_MEDSupport_i.cxx index 0db6c4095..56f3b73eb 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.cxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.cxx @@ -1,33 +1,32 @@ -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// Copyright (C) 2007-2008 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. // -// Copyright (C) 2003 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. -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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 // +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // File : SMESH_MEDSupport_i.cxx // Module : SMESH - -using namespace std; +// #include "SMESH_MEDSupport_i.hxx" #include "utilities.h" #include "Utils_CorbaException.hxx" +#include "Utils_ExceptHandlers.hxx" #include #include "SMESHDS_Mesh.hxx" @@ -36,6 +35,9 @@ using namespace std; #include "SMESH_Mesh_i.hxx" #include "SMESH_subMesh_i.hxx" +using namespace std; + + //============================================================================= /*! * Default constructor @@ -296,6 +298,7 @@ CORBA::Long SMESH_MEDSupport_i::getNumberOfElements(SALOME_MED:: SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) { + Unexpect aCatch(SALOME_SalomeException); if (_subMeshDS==NULL) THROW_SALOME_CORBA_EXCEPTION("No associated Support", SALOME::INTERNAL_ERROR); @@ -309,13 +312,12 @@ SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( int i = 0; myseq->length(_subMeshDS->NbNodes()); - SMDS_Iterator * it = _subMeshDS->GetNodes(); + SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes(); while(it->more()) { myseq[i] = it->next()->GetID(); i++; }; - delete it; SCRUTE(myseq->length()); MESSAGE("End of SMESH_MEDSupport_i::getNumber"); @@ -323,6 +325,18 @@ SALOME_MED::long_array * SMESH_MEDSupport_i::getNumber( } +//============================================================================= +/*! + * CORBA: get Nodes from file + */ +//============================================================================= + +SALOME_MED::long_array * SMESH_MEDSupport_i::getNumberFromFile( + SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception) +{ + return getNumber(geomElement); +} + //============================================================================= /*! * CORBA: Global Nodes Index (optionnaly designed by the user) @@ -337,7 +351,6 @@ SALOME_MED::long_array * THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM); return NULL; } - //============================================================================= /*! * CORBA: Array containing indexes for elements included in the support