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
29 #ifndef MED_V2_2_Wrapper_HeaderFile
30 #define MED_V2_2_Wrapper_HeaderFile
32 #include "MED_Structures.hxx"
33 #include "MED_TWrapper.hxx"
39 GetDESCLength<eV2_2>();
43 GetIDENTLength<eV2_2>();
47 GetNOMLength<eV2_2>();
51 GetLNOMLength<eV2_2>();
55 GetPNOMLength<eV2_2>();
59 GetNbConn<eV2_2>(EGeometrieElement typmai,
60 EEntiteMaillage typent,
66 typedef MED::TTMeshInfo<eV2_2> TVMeshInfo;
68 typedef MED::TTFamilyInfo<eV2_2> TVFamilyInfo;
70 typedef MED::TTNodeInfo<eV2_2> TVNodeInfo;
72 typedef MED::TTCellInfo<eV2_2> TVCellInfo;
74 typedef MED::TTFieldInfo<eV2_2> TVFieldInfo;
76 typedef MED::TTTimeStampInfo<eV2_2> TVTimeStampInfo;
78 typedef MED::TTTimeStampVal<eV2_2> TVTimeStampVal;
80 typedef MED::TTGrilleInfo<eV2_2> TVGrilleInfo;
82 //---------------------------------------------------------------
84 typedef boost::shared_ptr<TFile> PFile;
86 typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces;
88 //---------------------------------------------------------------
89 class TVWrapper: public MED::TTWrapper<eV2_2>
92 TVWrapper(const TVWrapper&);
93 TVWrapper& operator=(const TVWrapper&);
96 TVWrapper(const std::string& theFileName);
98 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 GetNbMeshes(TErr* theErr = NULL);
105 GetMeshInfo(TInt theMeshId, MED::TMeshInfo&,
106 TErr* theErr = NULL);
110 SetMeshInfo(const MED::TMeshInfo& theInfo,
111 TErr* theErr = NULL);
113 void SetMeshInfo(const MED::TMeshInfo& theInfo,
115 TErr* theErr = NULL);
118 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121 GetNbFamilies(const MED::TMeshInfo& theMeshInfo,
122 TErr* theErr = NULL);
126 GetNbFamAttr(TInt theFamId,
127 const MED::TMeshInfo& theInfo,
128 TErr* theErr = NULL);
132 GetNbFamGroup(TInt theFamId,
133 const MED::TMeshInfo& theInfo,
134 TErr* theErr = NULL);
138 GetFamilyInfo(TInt theFamId,
139 MED::TFamilyInfo& theInfo,
140 TErr* theErr = NULL);
144 SetFamilyInfo(const MED::TFamilyInfo& theInfo,
145 TErr* theErr = NULL);
148 SetFamilyInfo(const MED::TFamilyInfo& theInfo,
150 TErr* theErr = NULL);
153 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156 GetNames(TElemInfo& theInfo,
158 EEntiteMaillage theEntity,
159 EGeometrieElement theGeom,
160 TErr* theErr = NULL);
164 GetNumeration(TElemInfo& theInfo,
166 EEntiteMaillage theEntity,
167 EGeometrieElement theGeom,
168 TErr* theErr = NULL);
172 GetFamilies(TElemInfo& theInfo,
174 EEntiteMaillage theEntity,
175 EGeometrieElement theGeom,
176 TErr* theErr = NULL);
180 SetNames(const TElemInfo& theInfo,
181 EEntiteMaillage theEntity,
182 EGeometrieElement theGeom,
183 TErr* theErr = NULL);
186 SetNames(const TElemInfo& theInfo,
188 EEntiteMaillage theEntity,
189 EGeometrieElement theGeom,
190 TErr* theErr = NULL);
194 SetNumeration(const TElemInfo& theInfo,
195 EEntiteMaillage theEntity,
196 EGeometrieElement theGeom,
197 TErr* theErr = NULL);
199 SetNumeration(const TElemInfo& theInfo,
201 EEntiteMaillage theEntity,
202 EGeometrieElement theGeom,
203 TErr* theErr = NULL);
207 SetFamilies(const TElemInfo& theInfo,
208 EEntiteMaillage theEntity,
209 EGeometrieElement theGeom,
210 TErr* theErr = NULL);
212 SetFamilies(const TElemInfo& theInfo,
214 EEntiteMaillage theEntity,
215 EGeometrieElement theGeom,
216 TErr* theErr = NULL);
218 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221 GetNbNodes(const MED::TMeshInfo& theMeshInfo,
224 return GetNbNodes(theMeshInfo,eCOOR,theErr);
228 GetNbNodes(const MED::TMeshInfo& theMeshInfo,
230 TErr* theErr = NULL);
234 GetNodeInfo(MED::TNodeInfo& theInfo,
235 TErr* theErr = NULL);
239 SetNodeInfo(const MED::TNodeInfo& theInfo,
240 TErr* theErr = NULL);
243 SetNodeInfo(const MED::TNodeInfo& theInfo,
245 TErr* theErr = NULL);
247 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
250 GetPolygoneInfo(TPolygoneInfo& theInfo,
251 TErr* theErr = NULL);
255 SetPolygoneInfo(const TPolygoneInfo& theInfo,
256 TErr* theErr = NULL);
259 SetPolygoneInfo(const MED::TPolygoneInfo& theInfo,
261 TErr* theErr = NULL);
265 GetNbPolygones(const TMeshInfo& theMeshInfo,
266 EEntiteMaillage theEntity,
267 EGeometrieElement theGeom,
268 EConnectivite theConnMode = eNOD,
269 TErr* theErr = NULL);
273 GetPolygoneConnSize(const TMeshInfo& theMeshInfo,
274 EEntiteMaillage theEntity,
275 EGeometrieElement theGeom,
276 EConnectivite theConnMode = eNOD,
277 TErr* theErr = NULL);
279 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282 GetPolyedreInfo(TPolyedreInfo& theInfo,
283 TErr* theErr = NULL);
287 SetPolyedreInfo(const TPolyedreInfo& theInfo,
288 TErr* theErr = NULL);
291 SetPolyedreInfo(const MED::TPolyedreInfo& theInfo,
293 TErr* theErr = NULL);
297 GetNbPolyedres(const TMeshInfo& theMeshInfo,
301 TErr* theErr = NULL);
305 GetPolyedreConnSize(const TMeshInfo& theMeshInfo,
308 EConnectivite theConnMode = eNOD,
309 TErr* theErr = NULL);
311 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
314 GetEntityInfo(const MED::TMeshInfo& theMeshInfo,
315 EConnectivite theConnMode = eNOD,
316 TErr* theErr = NULL);
320 GetNbCells(const MED::TMeshInfo& theMeshInfo,
323 EConnectivite theConnMode = eNOD,
324 TErr* theErr = NULL);
328 GetCellInfo(MED::TCellInfo& theInfo,
329 TErr* theErr = NULL);
333 SetCellInfo(const MED::TCellInfo& theInfo,
334 TErr* theErr = NULL);
337 SetCellInfo(const MED::TCellInfo& theInfo,
339 TErr* theErr = NULL);
342 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
345 GetNbFields(TErr* theErr = NULL);
349 GetNbComp(TInt theFieldId,
350 TErr* theErr = NULL);
354 GetFieldInfo(TInt theFieldId,
355 MED::TFieldInfo& theInfo,
356 TErr* theErr = NULL);
360 SetFieldInfo(const MED::TFieldInfo& theInfo,
361 TErr* theErr = NULL);
364 SetFieldInfo(const MED::TFieldInfo& theInfo,
366 TErr* theErr = NULL);
368 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
371 GetNbGauss(TErr* theErr = NULL);
375 GetGaussPreInfo(TInt theId,
376 TErr* theErr = NULL);
380 GetGaussInfo(TInt theId,
382 TErr* theErr = NULL);
384 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
387 GetNbProfiles(TErr* theErr = NULL);
391 GetProfilePreInfo(TInt theId,
392 TErr* theErr = NULL);
396 GetProfileInfo(TInt theId,
397 TProfileInfo& theInfo,
398 TErr* theErr = NULL);
401 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 GetNbTimeStamps(const MED::TFieldInfo& theInfo,
405 const MED::TEntityInfo& theEntityInfo,
406 EEntiteMaillage& theEntity,
407 TGeom2Size& theGeom2Size,
408 TErr* theErr = NULL);
412 GetTimeStampInfo(TInt theTimeStampId,
413 MED::TTimeStampInfo& theInfo,
414 TErr* theErr = NULL);
418 GetTimeStampVal(MED::TTimeStampVal& theVal,
419 const TMKey2Profile& theMKey2Profile,
420 const TKey2Gauss& theKey2Gauss,
421 TErr* theErr = NULL);
425 SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal,
426 TErr* theErr = NULL);
429 SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal,
431 TErr* theErr = NULL);
435 GetGrilleInfo(TGrilleInfo& theGrilleInfo,
436 TErr* theErr = NULL);
440 SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo,
441 TErr* theErr = NULL);
444 SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo,
446 TErr* theErr = NULL);
450 GetGrilleType(const MED::TMeshInfo& theMeshInfo,
452 TErr* theErr = NULL);
455 GetGrilleStruct(const MED::TMeshInfo& theMeshInfo,
456 TIntVector& theStruct,
457 TErr* theErr = NULL);