Salome HOME
PR: merged from V5_1_4rc1
[modules/smesh.git] / src / SMESH_I / SMESH_MEDSupport_i.hxx
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
24 // File : SMESH_MEDSupport_i.hxx
25 // Module : SMESH
26 //
27 #ifndef _MED_SMESH_MEDSUPPORT_I_HXX_
28 #define _MED_SMESH_MEDSUPPORT_I_HXX_
29
30 #include "SMESH.hxx"
31
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(MED)
34 #include <string>
35
36 #include "SMESHDS_Mesh.hxx"
37 #include "SMESHDS_SubMesh.hxx"
38 #include "SMDS_MeshElement.hxx"
39 #include "SMDS_MeshNode.hxx"
40
41 #include "SMESH_MEDSupport_i.hxx"
42 #include "SALOME_GenericObj_i.hh"
43 class SMESH_subMesh_i;
44
45 class SMESH_I_EXPORT SMESH_MEDSupport_i:
46         public virtual POA_SALOME_MED::SUPPORT, public virtual SALOME::GenericObj_i
47 {
48   public:
49
50 // Constructors and associated internal methods
51         SMESH_MEDSupport_i(SMESH_subMesh_i * sm,
52                 std::string name, std::string description, SALOME_MED::medEntityMesh entity);
53         SMESH_MEDSupport_i(const SMESH_MEDSupport_i & s);
54
55 // IDL Methods
56         char *getName() throw(SALOME::SALOME_Exception);
57         char *getDescription() throw(SALOME::SALOME_Exception);
58         SALOME_MED::MESH_ptr getMesh() throw(SALOME::SALOME_Exception);
59         CORBA::Boolean isOnAllElements() throw(SALOME::SALOME_Exception);
60         SALOME_MED::medEntityMesh getEntity() throw(SALOME::SALOME_Exception);
61         CORBA::Long
62         getNumberOfElements(SALOME_MED::medGeometryElement geomElement)
63           throw(SALOME::SALOME_Exception);
64
65         CORBA::Long getNumberOfTypes() throw (SALOME::SALOME_Exception);
66
67         SALOME_MED::long_array *
68         getNumber(SALOME_MED::medGeometryElement geomElement)
69           throw(SALOME::SALOME_Exception);
70
71   /*!
72    * Same function as getNumber.
73    */
74         SALOME_MED::long_array *
75         getNumberFromFile(SALOME_MED::medGeometryElement geomElement)
76           throw(SALOME::SALOME_Exception);
77
78         SALOME_MED::long_array * getNumberIndex()
79           throw(SALOME::SALOME_Exception);
80
81         CORBA::Long
82         getNumberOfGaussPoint(SALOME_MED::medGeometryElement geomElement)
83           throw(SALOME::SALOME_Exception);
84
85         SALOME_MED::long_array* getNumbersOfGaussPoint()
86           throw (SALOME::SALOME_Exception);
87
88         SALOME_MED::medGeometryElement_array *getTypes()
89           throw(SALOME::SALOME_Exception);
90
91         void getBoundaryElements() throw (SALOME::SALOME_Exception);
92
93         CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
94
95         SALOME_MED::SUPPORT::supportInfos * getSupportGlobal()
96           throw (SALOME::SALOME_Exception);
97
98         void createSeq() throw(SALOME::SALOME_Exception);
99
100   public: //public field
101         const SMESHDS_SubMesh * _subMeshDS;
102         ::SMESH_subMesh_i * _subMesh_i;
103
104         SMESHDS_Mesh * _meshDS;
105         std::string _name;
106         std::string _description;
107         bool _isOnAllElements;
108         bool _seqNumber;
109         int _seqLength;
110
111         SALOME_MED::medEntityMesh _entity;
112         SALOME_MED::medGeometryElement * _geometricType;
113         int _numberOfGeometricType;
114
115   protected:
116         SMESH_MEDSupport_i();
117         ~SMESH_MEDSupport_i();
118 };
119
120 #endif /* _MED_MEDSUPPORT_I_HXX_ */