Salome HOME
Cherry-pick 254c2216: Python3 porting: fix the pb with creation of StdMeshersBuilder_...
[modules/smesh.git] / src / MEDWrapper / MED_Common.hxx
1 // Copyright (C) 2007-2016  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, or (at your option) any later version.
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 #ifndef MED_Common_HeaderFile
24 #define MED_Common_HeaderFile
25
26 #include "MED_WrapperDef.hxx"
27 #include "MED_Vector.hxx"
28 #include "MED_SharedPtr.hxx"
29
30 #include <string>
31 #include <set>
32 #include <map>
33
34 #include <hdf5.h>
35
36 #ifdef WIN32
37 #pragma warning(disable:4099)
38 #endif
39
40 namespace MED
41 {
42   typedef enum {eFAUX, eVRAI} EBooleen;
43   typedef double TFloat;
44 #if defined(HAVE_F77INT64)
45   typedef long TInt;
46 #else
47   typedef int TInt;
48 #endif
49   typedef hid_t TIdt;
50   typedef herr_t TErr;
51
52   typedef enum {eFULL_INTERLACE, eNO_INTERLACE} EModeSwitch;
53
54   typedef enum {eFLOAT64=6, eINT=24, eLONG=26} ETypeChamp;
55
56   typedef enum {eNON_STRUCTURE, eSTRUCTURE} EMaillage;
57
58   typedef enum {eCART, eCYL, eSPHER} ERepere;
59
60   typedef enum {eNOD, eDESC} EConnectivite;
61
62   typedef enum {ePOINT1=1, eSEG2=102, eSEG3=103, eTRIA3=203,
63                 eQUAD4=204, eTRIA6=206, eTRIA7=207, eQUAD8=208, eQUAD9=209, eTETRA4=304,
64                 ePYRA5=305, ePENTA6=306, eHEXA8=308, eOCTA12=312, eTETRA10=310,
65                 ePYRA13=313, ePENTA15=315, eHEXA20=320, eHEXA27=327,
66                 ePOLYGONE=400, ePOLYGON2=420, ePOLYEDRE=500, eNONE=0,
67                 eBALL=1101, // no such a type in med.h, it's just a trick
68                 eAllGeoType=-1} EGeometrieElement;
69
70   typedef enum {eMAILLE, eFACE, eARETE, eNOEUD, eNOEUD_ELEMENT, eSTRUCT_ELEMENT} EEntiteMaillage;
71
72   typedef enum {eNO_PFLMOD, eGLOBAL, eCOMPACT} EModeProfil;
73
74   typedef enum {eGRILLE_CARTESIENNE, eGRILLE_POLAIRE, eGRILLE_STANDARD} EGrilleType;
75
76   typedef enum {eCOOR, eCONN, eNOM, eNUM, eFAM, eCOOR_IND1, eCOOR_IND2, eCOOR_IND3} ETable;
77
78   typedef TVector<TInt> TIntVector;
79   typedef TVector<TFloat> TFloatVector;
80   typedef TVector<std::string> TStringVector;
81   typedef std::set<std::string> TStringSet;
82
83   typedef std::map<EGeometrieElement,TInt> TGeom2Size;
84   typedef std::map<EEntiteMaillage,TGeom2Size> TEntityInfo;
85
86   typedef std::set<EGeometrieElement> TGeomSet;
87   typedef std::map<EEntiteMaillage,TGeomSet> TEntity2GeomSet;
88
89   struct TNameInfo;
90   typedef SharedPtr<TNameInfo> PNameInfo;
91
92   struct TMeshInfo;
93   typedef SharedPtr<TMeshInfo> PMeshInfo;
94
95   struct TFamilyInfo;
96   typedef SharedPtr<TFamilyInfo> PFamilyInfo;
97
98   struct TElemInfo;
99   typedef SharedPtr<TElemInfo> PElemInfo;
100
101   struct TNodeInfo;
102   typedef SharedPtr<TNodeInfo> PNodeInfo;
103
104   struct TPolygoneInfo;
105   typedef SharedPtr<TPolygoneInfo> PPolygoneInfo;
106
107   struct TPolyedreInfo;
108   typedef SharedPtr<TPolyedreInfo> PPolyedreInfo;
109
110   struct TCellInfo;
111   typedef SharedPtr<TCellInfo> PCellInfo;
112
113   struct TBallInfo;
114   typedef SharedPtr<TBallInfo> PBallInfo;
115
116   struct TFieldInfo;
117   typedef SharedPtr<TFieldInfo> PFieldInfo;
118
119   struct TTimeStampInfo;
120   typedef SharedPtr<TTimeStampInfo> PTimeStampInfo;
121
122   struct TProfileInfo;
123   typedef SharedPtr<TProfileInfo> PProfileInfo;
124
125   struct TGaussInfo;
126   typedef SharedPtr<TGaussInfo> PGaussInfo;
127
128   class TGrilleInfo;
129   typedef SharedPtr<TGrilleInfo> PGrilleInfo;
130
131   struct TTimeStampValueBase;
132   typedef SharedPtr<TTimeStampValueBase> PTimeStampValueBase;
133
134   struct TWrapper;
135   typedef SharedPtr<TWrapper> PWrapper;
136
137   MEDWRAPPER_EXPORT
138   TInt
139   GetDESCLength();
140
141   MEDWRAPPER_EXPORT
142   TInt
143   GetIDENTLength();
144
145   MEDWRAPPER_EXPORT
146   TInt
147   GetNOMLength();
148
149   MEDWRAPPER_EXPORT
150   TInt
151   GetLNOMLength();
152
153   MEDWRAPPER_EXPORT
154   TInt
155   GetPNOMLength();
156
157   MEDWRAPPER_EXPORT
158   void
159   GetVersionRelease(TInt&, TInt&, TInt&);
160
161   MEDWRAPPER_EXPORT
162   TInt
163   GetNbConn(EGeometrieElement, EEntiteMaillage, TInt);
164
165   MEDWRAPPER_EXPORT
166   TInt
167   GetNbNodes(EGeometrieElement typmai);
168
169   MEDWRAPPER_EXPORT
170   const TEntity2GeomSet&
171   GetEntity2GeomSet();
172 }
173
174 #endif // MED_Common_HeaderFile