1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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, or (at your option) any later version.
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef MED_Wrapper_HeaderFile
24 #define MED_Wrapper_HeaderFile
26 #include "MED_WrapperDef.hxx"
27 #include "MED_Structures.hxx"
28 #include "MED_Algorithm.hxx"
30 #include <boost/thread/mutex.hpp>
34 //----------------------------------------------------------------------------
35 //! Define a base class that wraps the MED API
36 struct MEDWRAPPER_EXPORT TWrapper
38 typedef boost::mutex TMutex;
39 //! This is a syncronization primitive which allow to support thread safety for the MED access
45 //----------------------------------------------------------------------------
46 //! Creates a MEDWrapper MED Mesh representation
49 CrMeshInfo(TInt theDim = 0, TInt theSpaceDim = 0,
50 const std::string& theValue = "",
51 EMaillage theType = eNON_STRUCTURE,
52 const std::string& theDesc = "") = 0;
54 //! A copy-constructor for the MEDWrapper MED Mesh representation
57 CrMeshInfo(const PMeshInfo& theInfo) = 0;
59 //! Read number of MED Mesh entities in the defined MED file
62 GetNbMeshes(TErr* theErr = NULL) = 0;
64 //! Read a MEDWrapper MED Mesh representation by its number
67 GetMeshInfo(TInt theMeshId,
69 TErr* theErr = NULL) = 0;
71 //! Write the MEDWrapper MED Mesh representation in the defined MED file
74 SetMeshInfo(const TMeshInfo& theInfo,
75 TErr* theErr = NULL) = 0;
77 //! Read a MEDWrapper MED Mesh representation by its number
80 GetPMeshInfo(TInt theId,
83 //----------------------------------------------------------------------------
84 //! Read number of MED Family entities in the defined MED file
87 GetNbFamilies(const TMeshInfo& theMeshInfo,
88 TErr* theErr = NULL) = 0;
90 //! Read number of attributes for defined MED Family
93 GetNbFamAttr(TInt theFamId,
94 const TMeshInfo& theInfo,
95 TErr* theErr = NULL) = 0;
97 //! Read number of MED Groups where MED Family with the number belong to
100 GetNbFamGroup(TInt theFamId,
101 const TMeshInfo& theInfo,
102 TErr* theErr = NULL) = 0;
104 //! Read a MEDWrapper MED Family representation by its number
107 GetFamilyInfo(TInt theFamId,
108 TFamilyInfo& theInfo,
109 TErr* theErr = NULL) = 0;
111 //! Write a MEDWrapper MED Family representation by its number
114 SetFamilyInfo(const TFamilyInfo& theInfo,
115 TErr* theErr = NULL) = 0;
117 //! Creates a MEDWrapper MED Family representation
120 CrFamilyInfo(const PMeshInfo& theMeshInfo,
124 const std::string& theValue = "") = 0;
126 //! Creates a MEDWrapper MED Family representation
129 CrFamilyInfo(const PMeshInfo& theMeshInfo,
130 const std::string& theValue,
132 const TStringSet& theGroupNames,
133 const TStringVector& theAttrDescs = TStringVector(),
134 const TIntVector& theAttrIds = TIntVector(),
135 const TIntVector& theAttrVals = TIntVector()) = 0;
137 //! A copy-constructor for the MEDWrapper MED Family representation
140 CrFamilyInfo(const PMeshInfo& theMeshInfo,
141 const PFamilyInfo& theInfo) = 0;
143 //! Write a MEDWrapper MED Family representation by its number
145 GetPFamilyInfo(const PMeshInfo& theMeshInfo,
147 TErr* theErr = NULL);
149 //----------------------------------------------------------------------------
150 //! Read sequence of names for any descendant of TElemInfo
153 GetNames(TElemInfo& theInfo,
155 EEntiteMaillage theEntity,
156 EGeometrieElement theGeom,
160 //! Read sequence of numerous for any descendant of TElemInfo
163 GetNumeration(TElemInfo& theInfo,
165 EEntiteMaillage theEntity,
166 EGeometrieElement theGeom,
170 //! Read sequence MED Family indexes for any descendant of TElemInfo
173 GetFamilies(TElemInfo& theInfo,
175 EEntiteMaillage theEntity,
176 EGeometrieElement theGeom,
180 //! Write sequence of names for any descendant of TElemInfo
183 SetNames(const TElemInfo& theInfo,
184 EEntiteMaillage theEntity,
185 EGeometrieElement theGeom,
189 //! Write sequence of numerous for any descendant of TElemInfo
192 SetNumeration(const TElemInfo& theInfo,
193 EEntiteMaillage theEntity,
194 EGeometrieElement theGeom,
198 //! Write sequence MED Family indexes for any descendant of TElemInfo
201 SetFamilies(const TElemInfo& theInfo,
202 EEntiteMaillage theEntity,
203 EGeometrieElement theGeom,
207 //! Read a MEDWrapper MED Element representation from defined MED file
209 GetPElemInfo(const PMeshInfo& theMeshInfo,
210 EEntiteMaillage theEntity = eNOEUD,
211 EGeometrieElement theGeom = ePOINT1,
212 EConnectivite theConnMode = eNOD,
213 TErr* theErr = NULL);
215 //----------------------------------------------------------------------------
216 //! Read number of nodes in defined MED Mesh
219 GetNbNodes(const TMeshInfo& theMeshInfo,
220 TErr* theErr = NULL) = 0;
224 GetNbNodes(const TMeshInfo& theMeshInfo,
231 //! Read a MEDWrapper MED Nodes representation from defined MED file
234 GetNodeInfo(TNodeInfo& theInfo,
235 TErr* theErr = NULL) = 0;
237 //! Write the MEDWrapper MED Nodes representation into defined MED file
240 SetNodeInfo(const TNodeInfo& theInfo,
241 TErr* theErr = NULL) = 0;
243 //! Creates a MEDWrapper MED Nodes representation
246 CrElemInfo(const PMeshInfo& theMeshInfo,
248 EBooleen theIsElemNum = eVRAI,
249 EBooleen theIsElemNames = eVRAI)
254 //! Creates a MEDWrapper MED Nodes representation
257 CrElemInfo(const PMeshInfo& theMeshInfo,
259 const TIntVector& theFamNum,
260 const TIntVector& aElemNum,
261 const TStringVector& aElemNames)
266 //! Creates a MEDWrapper MED Nodes representation
269 CrNodeInfo(const PMeshInfo& theMeshInfo,
271 EModeSwitch theMode = eFULL_INTERLACE,
272 ERepere theSystem = eCART,
273 EBooleen theIsElemNum = eVRAI,
274 EBooleen theIsElemNames = eVRAI) = 0;
276 //! Creates a MEDWrapper MED Nodes representation
279 CrNodeInfo(const PMeshInfo& theMeshInfo,
280 const TFloatVector& theNodeCoords,
281 EModeSwitch theMode = eFULL_INTERLACE,
282 ERepere theSystem = eCART,
283 const TStringVector& theCoordNames = TStringVector(),
284 const TStringVector& theCoordUnits = TStringVector(),
285 const TIntVector& theFamilyNums = TIntVector(),
286 const TIntVector& theElemNums = TIntVector(),
287 const TStringVector& theElemNames = TStringVector()) = 0;
289 //! A copy-constructor for the MEDWrapper MED Nodes representation
292 CrNodeInfo(const PMeshInfo& theMeshInfo,
293 const PNodeInfo& theInfo) = 0;
295 //! Read a MEDWrapper MED Nodes representation from defined MED file
297 GetPNodeInfo(const PMeshInfo& theMeshInfo,
298 TErr* theErr = NULL);
300 //----------------------------------------------------------------------------
301 //! Read a MEDWrapper MED Polygones representation from defined MED file
302 /*! This feature is supported only for version of 2.2 and higher */
305 GetPolygoneInfo(TPolygoneInfo& theInfo,
309 //! Write a MEDWrapper MED Polygones representation from defined MED file
310 /*! This feature is supported only for version of 2.2 and higher */
313 SetPolygoneInfo(const TPolygoneInfo& theInfo,
317 //! Read number of MED Polygones in defined MED Mesh
318 /*! This feature is supported only for version of 2.2 and higher */
321 GetNbPolygones(const TMeshInfo& theMeshInfo,
322 EEntiteMaillage theEntity,
323 EGeometrieElement theGeom,
324 EConnectivite theConnMode = eNOD,
330 //! Read connectivity infroamtion for the MED Polygones in defined MED Mesh
331 /*! This feature is supported only for version of 2.2 and higher */
334 GetPolygoneConnSize(const TMeshInfo& theMeshInfo,
335 EEntiteMaillage theEntity,
336 EGeometrieElement theGeom,
337 EConnectivite theConnMode = eNOD,
343 //! Creates a MEDWrapper MED Polygones representation
344 /*! This feature is supported only for version of 2.2 and higher */
347 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
348 EEntiteMaillage theEntity,
349 EGeometrieElement theGeom,
352 EConnectivite theConnMode = eNOD,
353 EBooleen theIsElemNum = eVRAI,
354 EBooleen theIsElemNames = eVRAI)
356 return PPolygoneInfo();
359 //! Creates a MEDWrapper MED Polygones representation
360 /*! This feature is supported only for version of 2.2 and higher */
363 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
364 EEntiteMaillage theEntity,
365 EGeometrieElement theGeom,
366 const TIntVector& theIndexes,
367 const TIntVector& theConnectivities,
368 EConnectivite theConnMode = eNOD,
369 const TIntVector& theFamilyNums = TIntVector(),
370 const TIntVector& theElemNums = TIntVector(),
371 const TStringVector& theElemNames = TStringVector())
373 return PPolygoneInfo();
376 //! A copy-constructor for the MEDWrapper MED Polygones representation
379 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
380 const PPolygoneInfo& theInfo)
382 return PPolygoneInfo();
385 //! Read a MEDWrapper MED Polygones representation from defined MED file
386 /*! This feature is support only for version of 2.2 and higher */
388 GetPPolygoneInfo(const PMeshInfo& theMeshInfo,
389 EEntiteMaillage theEntity,
390 EGeometrieElement theGeom,
391 EConnectivite theConnMode = eNOD);
393 //----------------------------------------------------------------------------
394 //! Read a MEDWrapper MED Polyedres representation from defined MED file
395 /*! This feature is support only for version of 2.2 and higher */
398 GetPolyedreInfo(TPolyedreInfo& theInfo,
402 //! Write a MEDWrapper MED Polyedres representation from defined MED file
403 /*! This feature is support only for version of 2.2 and higher */
406 SetPolyedreInfo(const TPolyedreInfo& theInfo,
410 //! Read number of MED Polyedres in defined MED Mesh
411 /*! This feature is support only for version of 2.2 and higher */
414 GetNbPolyedres(const TMeshInfo& theMeshInfo,
415 EEntiteMaillage theEntity,
416 EGeometrieElement theGeom,
417 EConnectivite theConnMode = eNOD,
423 //! Read connectivity infroamtion for the MED Polyedres in defined MED Mesh
424 /*! This feature is support only for version of 2.2 and higher */
427 GetPolyedreConnSize(const TMeshInfo& theMeshInfo,
430 EConnectivite theConnMode = eNOD,
433 theNbFaces = theConnSize = 0;
438 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
439 EEntiteMaillage theEntity,
440 EGeometrieElement theGeom,
444 EConnectivite theConnMode = eNOD,
445 EBooleen theIsElemNum = eVRAI,
446 EBooleen theIsElemNames = eVRAI)
448 return PPolyedreInfo();
451 //! Creates a MEDWrapper MED Polyedres representation
452 /*! This feature is support only for version of 2.2 and higher */
455 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
456 EEntiteMaillage theEntity,
457 EGeometrieElement theGeom,
458 const TIntVector& theIndexes,
459 const TIntVector& theFaces,
460 const TIntVector& theConnectivities,
461 EConnectivite theConnMode = eNOD,
462 const TIntVector& theFamilyNums = TIntVector(),
463 const TIntVector& theElemNums = TIntVector(),
464 const TStringVector& theElemNames = TStringVector())
466 return PPolyedreInfo();
469 //! A copy-constructor for the MEDWrapper MED Polyedres representation
472 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
473 const PPolyedreInfo& theInfo)
475 return PPolyedreInfo();
478 //! Read a MEDWrapper MED Polyedres representation from defined MED file
479 /*! This feature is support only for version of 2.2 and higher */
481 GetPPolyedreInfo(const PMeshInfo& theMeshInfo,
482 EEntiteMaillage theEntity,
483 EGeometrieElement theGeom,
484 EConnectivite theConnMode = eNOD);
486 //----------------------------------------------------------------------------
487 //! Get TEntityInfo which contains brief information about existing cells and their destribution among MED ENTITIES
490 GetEntityInfo(const TMeshInfo& theMeshInfo,
491 EConnectivite theConnMode = eNOD,
492 TErr* theErr = NULL) = 0;
494 //! Read number of cells for defined MED Mesh, ENTITY and geometrical type with define mode of connectivity
497 GetNbCells(const TMeshInfo& theMeshInfo,
498 EEntiteMaillage theEntity,
499 EGeometrieElement theGeom,
500 EConnectivite theConnMode = eNOD,
501 TErr* theErr = NULL) = 0;
503 //! Read a MEDWrapper MED Cells representation from defined MED file
506 GetCellInfo(TCellInfo& theInfo,
507 TErr* theErr = NULL) = 0;
509 //! Write the MEDWrapper MED Cells representation into defined MED file
512 SetCellInfo(const TCellInfo& theInfo,
513 TErr* theErr = NULL) = 0;
515 //! Creates a MEDWrapper MED Cells representation
518 CrCellInfo(const PMeshInfo& theMeshInfo,
519 EEntiteMaillage theEntity,
520 EGeometrieElement theGeom,
522 EConnectivite theConnMode = eNOD,
523 EBooleen theIsElemNum = eVRAI,
524 EBooleen theIsElemNames = eVRAI,
525 EModeSwitch theMode = eFULL_INTERLACE) = 0;
527 //! Creates a MEDWrapper MED Cells representation
530 CrCellInfo(const PMeshInfo& theMeshInfo,
531 EEntiteMaillage theEntity,
532 EGeometrieElement theGeom,
533 const TIntVector& theConnectivities,
534 EConnectivite theConnMode = eNOD,
535 const TIntVector& theFamilyNums = TIntVector(),
536 const TIntVector& theElemNums = TIntVector(),
537 const TStringVector& theElemNames = TStringVector(),
538 EModeSwitch theMode = eFULL_INTERLACE) = 0;
540 //! A copy-constructor for the MEDWrapper MED Cells representation
543 CrCellInfo(const PMeshInfo& theMeshInfo,
544 const PCellInfo& theInfo) = 0;
546 //! Read a MEDWrapper MED Cells representation from defined MED file
548 GetPCellInfo(const PMeshInfo& theMeshInfo,
549 EEntiteMaillage theEntity,
550 EGeometrieElement theGeom,
551 EConnectivite theConnMode = eNOD,
552 TErr* theErr = NULL);
554 //----------------------------------------------------------------------------
555 //! Read number of balls in the Mesh
556 /*! This feature is supported since version 3.0 */
559 GetNbBalls(const TMeshInfo& theMeshInfo)
564 //! Read a MEDWrapped representation of MED_BALL from the MED file
565 /*! This feature is supported since version 3.0 */
568 GetBallInfo(TBallInfo& theInfo,
572 //! Write a MEDWrapped representation of MED_BALL to the MED file
573 /*! This feature is supported since version 3.0 */
576 SetBallInfo(const TBallInfo& theInfo,
580 //! Creates a MEDWrapper MED Balls representation
581 /*! This feature is supported since version 3.0 */
584 CrBallInfo(const PMeshInfo& theMeshInfo,
586 EBooleen theIsElemNum = eVRAI)
591 //! Creates a MEDWrapper MED Balls representation
592 /*! This feature is supported since version 3.0 */
595 CrBallInfo(const PMeshInfo& theMeshInfo,
596 const TIntVector& theNodes,
597 TFloatVector& theDiameters,
598 const TIntVector& theFamilyNums = TIntVector(),
599 const TIntVector& theElemNums = TIntVector())
604 //! A copy-constructor for the MEDWrapped MED Balls representation
607 CrBallInfo(const PMeshInfo& theMeshInfo,
608 const PBallInfo& theInfo)
613 //! Read a MEDWrapped MED Balls representation from defined MED file
614 /*! This feature is supported since version 3.0 */
617 GetPBallInfo(const PMeshInfo& theMeshInfo);
619 //----------------------------------------------------------------------------
620 //! Read number of MED FIELDS in defined MED Mesh
623 GetNbFields(TErr* theErr = NULL) = 0;
625 //! Read number of components for the defined MED FIELD by its order number
628 GetNbComp(TInt theFieldId,
629 TErr* theErr = NULL) = 0;
631 //! Read MEDWrapper MED FIELD representation by its order number
634 GetFieldInfo(TInt theFieldId,
636 TErr* theErr = NULL) = 0;
638 //! Write MEDWrapper MED FIELD representation into defined MED file
641 SetFieldInfo(const TFieldInfo& theInfo,
642 TErr* theErr = NULL) = 0;
644 //! Creates a MEDWrapper MED FIELD representation
647 CrFieldInfo(const PMeshInfo& theMeshInfo,
649 ETypeChamp theType = eFLOAT64,
650 const std::string& theValue = "",
651 EBooleen theIsLocal = eVRAI,
652 TInt theNbRef = 1) = 0;
654 //! A copy-constructor for the MEDWrapper MED FIELD representation
657 CrFieldInfo(const PMeshInfo& theMeshInfo,
658 const PFieldInfo& theInfo) = 0;
660 //! Read a MEDWrapper MED FIELD representation from defined MED file
662 GetPFieldInfo(const PMeshInfo& theMeshInfo,
664 TErr* theErr = NULL);
666 //----------------------------------------------------------------------------
667 //! Read number of MED GAUSS in defined MED Mesh
668 /*! This feature is support only for version of 2.2 and higher */
671 GetNbGauss(TErr* theErr = NULL)
676 //! Read brief MED GAUSS information by its order number from defined MED Mesh
677 /*! This feature is support only for version of 2.2 and higher */
680 GetGaussPreInfo(TInt theId,
683 return TGaussInfo::TInfo( TGaussInfo::TKey(ePOINT1,""),0 );
686 //! Read a MEDWrapper MED GAUSS representation by its order number from defined MED file
687 /*! This feature is support only for version of 2.2 and higher */
690 GetGaussInfo(TInt theId,
695 //! Creates a MEDWrapper MED GAUSS representation
696 /*! This feature is support only for version of 2.2 and higher */
699 CrGaussInfo(const TGaussInfo::TInfo& theInfo,
700 EModeSwitch theMode = eFULL_INTERLACE) = 0;
702 //----------------------------------------------------------------------------
703 //! Read number of MED TIMESTAMPS in defined MED Mesh
705 By the way some additional information can be obtained:
706 - to what MED ENTITY the MED TIMESTAMP conntected to;
707 - on what geometrical types the MED TIMESTAMP defined to.
711 GetNbTimeStamps(const TFieldInfo& theInfo,
712 const TEntityInfo& theEntityInfo,
713 EEntiteMaillage& theEntity,
714 TGeom2Size& theGeom2Size,
715 TErr* theErr = NULL) = 0;
717 //! Read MEDWrapper MED TIMESTAMP representation by its order number
720 GetTimeStampInfo(TInt theTimeStampId,
721 TTimeStampInfo& theInfo,
722 TErr* theErr = NULL) = 0;
724 //! Creates a MEDWrapper MED TIMESTAMP representation
727 CrTimeStampInfo(const PFieldInfo& theFieldInfo,
728 EEntiteMaillage theEntity,
729 const TGeom2Size& theGeom2Size,
730 const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(),
734 const std::string& theUnitDt = "",
735 const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) = 0;
737 //! A copy-constructor for the MEDWrapper MED TIMESTAMP representation
740 CrTimeStampInfo(const PFieldInfo& theFieldInfo,
741 const PTimeStampInfo& theInfo) = 0;
743 //! Read MEDWrapper MED TIMESTAMP representation by its order number
745 GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
746 EEntiteMaillage theEntity,
747 const TGeom2Size& theGeom2Size,
749 TErr* theErr = NULL);
751 //----------------------------------------------------------------------------
752 //! Read number of MED PROFILES in defined MED Mesh
755 GetNbProfiles(TErr* theErr = NULL) = 0;
757 //! Read brief MED PROFILE information by its order number from defined MED Mesh
760 GetProfilePreInfo(TInt theId,
761 TErr* theErr = NULL) = 0;
763 //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file
766 GetProfileInfo(TInt theId,
767 TProfileInfo& theInfo,
768 TErr* theErr = NULL) = 0;
770 //! Creates a MEDWrapper MED PROFILE representation
773 CrProfileInfo(const TProfileInfo::TInfo& theInfo,
774 EModeProfil theMode = eCOMPACT) = 0;
776 //! Write a MEDWrapper MED PROFILE representation
779 SetProfileInfo(const TProfileInfo& theInfo,
780 TErr* theErr = NULL) = 0;
782 //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file
784 GetPProfileInfo(TInt theId,
785 EModeProfil theMode = eCOMPACT,
786 TErr* theErr = NULL);
788 //----------------------------------------------------------------------------
789 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
792 GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
793 const TMKey2Profile& theMKey2Profile,
794 const TKey2Gauss& theKey2Gauss,
795 TErr* theErr = NULL) = 0;
797 //! Write the values for MEDWrapper MED TIEMSTAMP to defined MED file
800 SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
801 TErr* theErr = NULL) = 0;
803 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
806 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
807 ETypeChamp theTypeChamp,
808 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
809 EModeSwitch theMode = eFULL_INTERLACE) = 0;
811 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
814 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
815 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
816 EModeSwitch theMode = eFULL_INTERLACE);
818 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
821 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
822 const PTimeStampValueBase& theInfo,
823 ETypeChamp theTypeChamp) = 0;
825 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
828 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
829 const PTimeStampValueBase& theInfo);
831 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
833 GetPTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
834 const TMKey2Profile& theMKey2Profile,
835 const TKey2Gauss& theKey2Gauss,
836 TErr* theErr = NULL);
838 //----------------------------------------------------------------------------
839 // Backward compatibility declarations
840 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
843 GetTimeStampVal(const PTimeStampVal& theVal,
844 const TMKey2Profile& theMKey2Profile,
845 const TKey2Gauss& theKey2Gauss,
846 TErr* theErr = NULL);
848 //! Write the values for MEDWrapper MED TIEMSTAMP to defined MED file
851 SetTimeStamp(const PTimeStampVal& theVal,
852 TErr* theErr = NULL);
854 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
857 CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
858 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
859 EModeSwitch theMode = eFULL_INTERLACE);
861 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
864 CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
865 const PTimeStampVal& theInfo);
867 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
869 GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
870 const TMKey2Profile& theMKey2Profile,
871 const TKey2Gauss& theKey2Gauss,
872 TErr* theErr = NULL);
874 //----------------------------------------------------------------------------
875 //! Read a MEDWrapper MED Grille representation from defined MED file
876 /*! This feature is support only for version of 2.2 and higher */
878 GetPGrilleInfo(const PMeshInfo& theMeshInfo);
880 //! Read a MEDWrapper MED Grille representation from defined MED file
881 /*! This feature is support only for version of 2.2 and higher */
883 GetPGrilleInfo(const PMeshInfo& theMeshInfo,
884 const PGrilleInfo& theInfo);
886 //! Read a MEDWrapper MED Grille representation from defined MED file
887 /*! This feature is support only for version of 2.2 and higher */
890 GetGrilleInfo(TGrilleInfo& theInfo,
894 //! Write the MEDWrapper MED Grille representation into defined MED file
895 /*! This feature is support only for version of 2.2 and higher */
898 SetGrilleInfo(const TGrilleInfo& theInfo,
902 /*! This feature is support only for version of 2.2 and higher */
905 CrGrilleInfo(const PMeshInfo& theMeshInfo,
906 const PGrilleInfo& theGrilleInfo)
908 return PGrilleInfo();
911 /*! This feature is support only for version of 2.2 and higher */
914 CrGrilleInfo(const PMeshInfo& theMeshInfo)
916 return PGrilleInfo();
919 /*! This feature is support only for version of 2.2 and higher */
922 CrGrilleInfo(const PMeshInfo& theMeshInfo,
923 const EGrilleType& type)
925 return PGrilleInfo();
928 /*! This feature is support only for version of 2.2 and higher */
931 CrGrilleInfo(const PMeshInfo& theMeshInfo,
932 const EGrilleType& type,
935 return PGrilleInfo();
938 /*! This feature is support only for version of 2.2 and higher */
941 CrGrilleInfo(const PMeshInfo& theMeshInfo,
942 const EGrilleType& type,
943 const MED::TIntVector& nbNodeVec)
945 return PGrilleInfo();
948 /*! This feature is support only for version of 2.2 and higher */
951 GetGrilleType(const TMeshInfo& theMeshInfo,
958 //----------------------------------------------------------------------------
959 //! This class provide thread-safety for MEDWrapper interaction
960 class MEDWRAPPER_EXPORT TLockProxy
962 TLockProxy& operator=(const TLockProxy& );
966 TLockProxy(TWrapper* theWrapper);
970 TWrapper * operator-> () const;
973 //----------------------------------------------------------------------------
974 //! To specialize the SharedPtr for TWrapper
976 class MEDWRAPPER_EXPORT SharedPtr<TWrapper>: public boost::shared_ptr<TWrapper>
982 explicit SharedPtr(Y * p):
983 boost::shared_ptr<TWrapper>(p)
987 SharedPtr(SharedPtr<Y> const & r):
988 boost::shared_ptr<TWrapper>(boost::dynamic_pointer_cast<TWrapper,Y>(r))
993 operator=(SharedPtr<Y> const & r)
995 SharedPtr<TWrapper>(r).swap(*this);
1001 operator()(Y * p) // Y must be complete
1003 return operator=<Y>(SharedPtr<Y>(p));
1008 operator()(SharedPtr<Y> const & r) // Y must be complete
1010 return operator=<Y>(SharedPtr<Y>(r));
1013 TLockProxy operator-> () const // never throws
1015 return TLockProxy(this->get());
1019 operator const TWrapper& () const;
1021 operator TWrapper& ();
1023 TWrapper& operator* () const;
1025 TWrapper * get() const // never throws
1027 return boost::shared_ptr<TWrapper>::get();
1031 //----------------------------------------------------------------------------
1032 typedef SharedPtr<TWrapper> PWrapper;
1035 #endif // MED_Wrapper_HeaderFile