1 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESH_subMesh_i.cxx
25 // Author : Paul RASCLE, EDF
31 #include "SMESH_subMesh_i.hxx"
32 #include "SMESH_Gen_i.hxx"
33 #include "SMESH_Mesh_i.hxx"
35 #include "Utils_CorbaException.hxx"
36 #include "utilities.h"
39 //=============================================================================
43 //=============================================================================
45 SMESH_subMesh_i::SMESH_subMesh_i()
47 MESSAGE("SMESH_subMesh_i::SMESH_subMesh_i default, not for use");
51 //=============================================================================
55 //=============================================================================
57 SMESH_subMesh_i::SMESH_subMesh_i(SMESH_Gen_i* gen_i,
61 MESSAGE("SMESH_subMesh_i::SMESH_subMesh_i");
67 //=============================================================================
71 //=============================================================================
73 SMESH_subMesh_i::~SMESH_subMesh_i()
75 MESSAGE("SMESH_subMesh_i::~SMESH_subMesh_i");
79 //=============================================================================
83 //=============================================================================
85 CORBA::Long SMESH_subMesh_i::GetNumberOfElements()
86 throw (SALOME::SALOME_Exception)
88 MESSAGE("SMESH_subMesh_i::GetNumberOfElements");
92 //=============================================================================
96 //=============================================================================
98 CORBA::Long SMESH_subMesh_i::GetNumberOfNodes()
99 throw (SALOME::SALOME_Exception)
101 MESSAGE("SMESH_subMesh_i::GetNumberOfNodes");
105 //=============================================================================
109 //=============================================================================
111 SMESH::long_array* SMESH_subMesh_i::GetElementsId()
112 throw (SALOME::SALOME_Exception)
114 MESSAGE("SMESH_subMesh_i::GetElementsId");
118 //=============================================================================
122 //=============================================================================
124 SMESH::long_array* SMESH_subMesh_i::GetNodesId()
125 throw (SALOME::SALOME_Exception)
127 MESSAGE("SMESH_subMesh_i::GetNodesId");
131 //=============================================================================
135 //=============================================================================
137 SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetFather()
138 throw (SALOME::SALOME_Exception)
140 MESSAGE("SMESH_subMesh_i::GetFather");
141 SMESH::SMESH_Mesh_var meshIor = _mesh_i->GetIor();
142 return SMESH::SMESH_Mesh::_duplicate(meshIor);
145 //=============================================================================
149 //=============================================================================
151 CORBA::Long SMESH_subMesh_i::GetId()
153 MESSAGE("SMESH_subMesh_i::GetId");
157 //=============================================================================
161 //=============================================================================
162 SALOME_MED::FAMILY_ptr SMESH_subMesh_i::GetFamily()
163 throw (SALOME::SALOME_Exception)
165 SALOME_MED::MESH_var MEDMesh = GetFather()->GetMEDMesh();
167 SALOME_MED::Family_array_var families =
168 MEDMesh->getFamilies(SALOME_MED::MED_NODE);
170 for ( int i = 0; i < families->length(); i++ ) {
171 if ( families[i]->getIdentifier() == ( _localId ) )