00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef MED_V2_2_Wrapper_HeaderFile
00029 #define MED_V2_2_Wrapper_HeaderFile
00030
00031 #ifdef WNT
00032 #if defined MEDWRAPPER_V2_2_EXPORTS || defined MEDWrapper_V2_2_EXPORTS
00033 #if defined WIN32
00034 #define MED_V22_WRAPPER_EXPORT __declspec( dllexport )
00035 #else
00036 #define MED_V22_WRAPPER_EXPORT
00037 #endif
00038 #else
00039 #if defined WIN32
00040 #define MED_V22_WRAPPER_EXPORT __declspec( dllimport )
00041 #else
00042 #define MED_V22_WRAPPER_EXPORT
00043 #endif
00044 #endif
00045 #else
00046 #define MED_V22_WRAPPER_EXPORT
00047 #endif
00048
00049 #include "MED_Structures.hxx"
00050 #include "MED_TWrapper.hxx"
00051
00052 namespace MED
00053 {
00054 template<>
00055 TInt MED_V22_WRAPPER_EXPORT
00056 GetDESCLength<eV2_2>();
00057
00058 template<>
00059 TInt MED_V22_WRAPPER_EXPORT
00060 GetIDENTLength<eV2_2>();
00061
00062 template<>
00063 TInt MED_V22_WRAPPER_EXPORT
00064 GetNOMLength<eV2_2>();
00065
00066 template<>
00067 TInt MED_V22_WRAPPER_EXPORT
00068 GetLNOMLength<eV2_2>();
00069
00070 template<>
00071 TInt MED_V22_WRAPPER_EXPORT
00072 GetPNOMLength<eV2_2>();
00073
00074 template<>
00075 void MED_V22_WRAPPER_EXPORT
00076 GetVersionRelease<eV2_2>(TInt& majeur, TInt& mineur, TInt& release);
00077
00078 template<>
00079 TInt MED_V22_WRAPPER_EXPORT
00080 GetNbConn<eV2_2>(EGeometrieElement typmai,
00081 EEntiteMaillage typent,
00082 TInt mdim);
00083
00084 namespace V2_2
00085 {
00086
00087 class TFile;
00088 typedef boost::shared_ptr<TFile> PFile;
00089
00090 typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces;
00091
00092
00093 class MED_V22_WRAPPER_EXPORT TVWrapper: public MED::TTWrapper<eV2_2>
00094 {
00095 TVWrapper();
00096 TVWrapper(const TVWrapper&);
00097 TVWrapper& operator=(const TVWrapper&);
00098
00099 public:
00100 TVWrapper(const std::string& theFileName);
00101
00102
00103 virtual
00104 TInt
00105 GetNbMeshes(TErr* theErr = NULL);
00106
00107 virtual
00108 void
00109 GetMeshInfo(TInt theMeshId, MED::TMeshInfo&,
00110 TErr* theErr = NULL);
00111
00112 virtual
00113 void
00114 SetMeshInfo(const MED::TMeshInfo& theInfo,
00115 TErr* theErr = NULL);
00116
00117 void SetMeshInfo(const MED::TMeshInfo& theInfo,
00118 EModeAcces theMode,
00119 TErr* theErr = NULL);
00120
00121
00122
00123 virtual
00124 TInt
00125 GetNbFamilies(const MED::TMeshInfo& theMeshInfo,
00126 TErr* theErr = NULL);
00127
00128 virtual
00129 TInt
00130 GetNbFamAttr(TInt theFamId,
00131 const MED::TMeshInfo& theInfo,
00132 TErr* theErr = NULL);
00133
00134 virtual
00135 TInt
00136 GetNbFamGroup(TInt theFamId,
00137 const MED::TMeshInfo& theInfo,
00138 TErr* theErr = NULL);
00139
00140 virtual
00141 void
00142 GetFamilyInfo(TInt theFamId,
00143 MED::TFamilyInfo& theInfo,
00144 TErr* theErr = NULL);
00145
00146 virtual
00147 void
00148 SetFamilyInfo(const MED::TFamilyInfo& theInfo,
00149 TErr* theErr = NULL);
00150
00151 void
00152 SetFamilyInfo(const MED::TFamilyInfo& theInfo,
00153 EModeAcces theMode,
00154 TErr* theErr = NULL);
00155
00156
00157
00158 virtual
00159 void
00160 GetNames(TElemInfo& theInfo,
00161 TInt nb,
00162 EEntiteMaillage theEntity,
00163 EGeometrieElement theGeom,
00164 TErr* theErr = NULL);
00165
00166 virtual
00167 void
00168 GetNumeration(TElemInfo& theInfo,
00169 TInt nb,
00170 EEntiteMaillage theEntity,
00171 EGeometrieElement theGeom,
00172 TErr* theErr = NULL);
00173
00174 virtual
00175 void
00176 GetFamilies(TElemInfo& theInfo,
00177 TInt nb,
00178 EEntiteMaillage theEntity,
00179 EGeometrieElement theGeom,
00180 TErr* theErr = NULL);
00181
00182 virtual
00183 void
00184 SetNames(const TElemInfo& theInfo,
00185 EEntiteMaillage theEntity,
00186 EGeometrieElement theGeom,
00187 TErr* theErr = NULL);
00188
00189 void
00190 SetNames(const TElemInfo& theInfo,
00191 EModeAcces theMode,
00192 EEntiteMaillage theEntity,
00193 EGeometrieElement theGeom,
00194 TErr* theErr = NULL);
00195
00196 virtual
00197 void
00198 SetNumeration(const TElemInfo& theInfo,
00199 EEntiteMaillage theEntity,
00200 EGeometrieElement theGeom,
00201 TErr* theErr = NULL);
00202 void
00203 SetNumeration(const TElemInfo& theInfo,
00204 EModeAcces theMode,
00205 EEntiteMaillage theEntity,
00206 EGeometrieElement theGeom,
00207 TErr* theErr = NULL);
00208
00209 virtual
00210 void
00211 SetFamilies(const TElemInfo& theInfo,
00212 EEntiteMaillage theEntity,
00213 EGeometrieElement theGeom,
00214 TErr* theErr = NULL);
00215 void
00216 SetFamilies(const TElemInfo& theInfo,
00217 EModeAcces theMode,
00218 EEntiteMaillage theEntity,
00219 EGeometrieElement theGeom,
00220 TErr* theErr = NULL);
00221
00222
00223 virtual
00224 TInt
00225 GetNbNodes(const MED::TMeshInfo& theMeshInfo,
00226 TErr* theErr = NULL)
00227 {
00228 return GetNbNodes(theMeshInfo,eCOOR,theErr);
00229 }
00230
00231 TInt
00232 GetNbNodes(const MED::TMeshInfo& theMeshInfo,
00233 ETable theTable,
00234 TErr* theErr = NULL);
00235
00236 virtual
00237 void
00238 GetNodeInfo(MED::TNodeInfo& theInfo,
00239 TErr* theErr = NULL);
00240
00241 virtual
00242 void
00243 SetNodeInfo(const MED::TNodeInfo& theInfo,
00244 TErr* theErr = NULL);
00245
00246 void
00247 SetNodeInfo(const MED::TNodeInfo& theInfo,
00248 EModeAcces theMode,
00249 TErr* theErr = NULL);
00250
00251
00252 virtual
00253 void
00254 GetPolygoneInfo(TPolygoneInfo& theInfo,
00255 TErr* theErr = NULL);
00256
00257 virtual
00258 void
00259 SetPolygoneInfo(const TPolygoneInfo& theInfo,
00260 TErr* theErr = NULL);
00261
00262 void
00263 SetPolygoneInfo(const MED::TPolygoneInfo& theInfo,
00264 EModeAcces theMode,
00265 TErr* theErr = NULL);
00266
00267 virtual
00268 TInt
00269 GetNbPolygones(const TMeshInfo& theMeshInfo,
00270 EEntiteMaillage theEntity,
00271 EGeometrieElement theGeom,
00272 EConnectivite theConnMode = eNOD,
00273 TErr* theErr = NULL);
00274
00275 virtual
00276 TInt
00277 GetPolygoneConnSize(const TMeshInfo& theMeshInfo,
00278 EEntiteMaillage theEntity,
00279 EGeometrieElement theGeom,
00280 EConnectivite theConnMode = eNOD,
00281 TErr* theErr = NULL);
00282
00283
00284 virtual
00285 void
00286 GetPolyedreInfo(TPolyedreInfo& theInfo,
00287 TErr* theErr = NULL);
00288
00289 virtual
00290 void
00291 SetPolyedreInfo(const TPolyedreInfo& theInfo,
00292 TErr* theErr = NULL);
00293
00294 void
00295 SetPolyedreInfo(const MED::TPolyedreInfo& theInfo,
00296 EModeAcces theMode,
00297 TErr* theErr = NULL);
00298
00299 virtual
00300 TInt
00301 GetNbPolyedres(const TMeshInfo& theMeshInfo,
00302 EEntiteMaillage,
00303 EGeometrieElement,
00304 EConnectivite,
00305 TErr* theErr = NULL);
00306
00307 virtual
00308 void
00309 GetPolyedreConnSize(const TMeshInfo& theMeshInfo,
00310 TInt& theNbFaces,
00311 TInt& theConnSize,
00312 EConnectivite theConnMode = eNOD,
00313 TErr* theErr = NULL);
00314
00315
00316 virtual
00317 TEntityInfo
00318 GetEntityInfo(const MED::TMeshInfo& theMeshInfo,
00319 EConnectivite theConnMode = eNOD,
00320 TErr* theErr = NULL);
00321
00322 virtual
00323 TInt
00324 GetNbCells(const MED::TMeshInfo& theMeshInfo,
00325 EEntiteMaillage,
00326 EGeometrieElement,
00327 EConnectivite theConnMode = eNOD,
00328 TErr* theErr = NULL);
00329
00330 virtual
00331 void
00332 GetCellInfo(MED::TCellInfo& theInfo,
00333 TErr* theErr = NULL);
00334
00335 virtual
00336 void
00337 SetCellInfo(const MED::TCellInfo& theInfo,
00338 TErr* theErr = NULL);
00339
00340 void
00341 SetCellInfo(const MED::TCellInfo& theInfo,
00342 EModeAcces theMode,
00343 TErr* theErr = NULL);
00344
00345
00346
00347 virtual
00348 TInt
00349 GetNbFields(TErr* theErr = NULL);
00350
00351 virtual
00352 TInt
00353 GetNbComp(TInt theFieldId,
00354 TErr* theErr = NULL);
00355
00356 virtual
00357 void
00358 GetFieldInfo(TInt theFieldId,
00359 MED::TFieldInfo& theInfo,
00360 TErr* theErr = NULL);
00361
00362 virtual
00363 void
00364 SetFieldInfo(const MED::TFieldInfo& theInfo,
00365 TErr* theErr = NULL);
00366
00367 void
00368 SetFieldInfo(const MED::TFieldInfo& theInfo,
00369 EModeAcces theMode,
00370 TErr* theErr = NULL);
00371
00372
00373 virtual
00374 TInt
00375 GetNbGauss(TErr* theErr = NULL);
00376
00377 virtual
00378 TGaussInfo::TInfo
00379 GetGaussPreInfo(TInt theId,
00380 TErr* theErr = NULL);
00381
00382 virtual
00383 void
00384 GetGaussInfo(TInt theId,
00385 TGaussInfo& theInfo,
00386 TErr* theErr = NULL);
00387
00388
00389 virtual
00390 TInt
00391 GetNbProfiles(TErr* theErr = NULL);
00392
00393 virtual
00394 TProfileInfo::TInfo
00395 GetProfilePreInfo(TInt theId,
00396 TErr* theErr = NULL);
00397
00398 virtual
00399 void
00400 GetProfileInfo(TInt theId,
00401 TProfileInfo& theInfo,
00402 TErr* theErr = NULL);
00403
00404 virtual
00405 void
00406 SetProfileInfo(const TProfileInfo& theInfo,
00407 TErr* theErr = NULL);
00408
00409 void
00410 SetProfileInfo(const TProfileInfo& theInfo,
00411 EModeAcces theMode,
00412 TErr* theErr = NULL);
00413
00414
00415 virtual
00416 TInt
00417 GetNbTimeStamps(const MED::TFieldInfo& theInfo,
00418 const MED::TEntityInfo& theEntityInfo,
00419 EEntiteMaillage& theEntity,
00420 TGeom2Size& theGeom2Size,
00421 TErr* theErr = NULL);
00422
00423 virtual
00424 void
00425 GetTimeStampInfo(TInt theTimeStampId,
00426 MED::TTimeStampInfo& theInfo,
00427 TErr* theErr = NULL);
00428
00429 virtual
00430 void
00431 GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
00432 const TMKey2Profile& theMKey2Profile,
00433 const TKey2Gauss& theKey2Gauss,
00434 TErr* theErr = NULL);
00435
00436 virtual
00437 void
00438 SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
00439 TErr* theErr = NULL);
00440
00441 void
00442 SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
00443 EModeAcces theMode,
00444 TErr* theErr = NULL);
00445
00446
00447
00448 virtual
00449 void
00450 GetGrilleInfo(TGrilleInfo& theGrilleInfo,
00451 TErr* theErr = NULL);
00452
00453 virtual
00454 void
00455 SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo,
00456 TErr* theErr = NULL);
00457
00458 void
00459 SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo,
00460 EModeAcces theMode,
00461 TErr* theErr = NULL);
00462
00463 virtual
00464 void
00465 GetGrilleType(const MED::TMeshInfo& theMeshInfo,
00466 EGrilleType& type,
00467 TErr* theErr = NULL);
00468
00469 void
00470 GetGrilleStruct(const MED::TMeshInfo& theMeshInfo,
00471 TIntVector& theStruct,
00472 TErr* theErr = NULL);
00473
00474 protected:
00475 PFile myFile;
00476 };
00477 }
00478 }
00479
00480 #endif