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