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