1 // Copyright (C) 2007-2015 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_WrapperBase.hxx"
28 #include "MED_Structures.hxx"
29 #include "MED_Algorithm.hxx"
31 #include <boost/thread/mutex.hpp>
36 //----------------------------------------------------------------------------
37 //! Define a base class that wraps the MED API
38 struct MEDWRAPPER_EXPORT TWrapper
40 typedef boost::mutex TMutex;
41 //! This is a syncronization primitive which allow to support thread safety for the MED access
47 //----------------------------------------------------------------------------
48 //! Gets version of the MED library used for the MED file
53 //----------------------------------------------------------------------------
54 //! Creates a MEDWrapper MED Mesh representation
57 CrMeshInfo(TInt theDim = 0, TInt theSpaceDim = 0,
58 const std::string& theValue = "",
59 EMaillage theType = eNON_STRUCTURE,
60 const std::string& theDesc = "") = 0;
62 //! A copy-constructor for the MEDWrapper MED Mesh representation
65 CrMeshInfo(const PMeshInfo& theInfo) = 0;
67 //! Read number of MED Mesh entities in the defined MED file
70 GetNbMeshes(TErr* theErr = NULL) = 0;
72 //! Read a MEDWrapper MED Mesh representation by its number
75 GetMeshInfo(TInt theMeshId,
77 TErr* theErr = NULL) = 0;
79 //! Write the MEDWrapper MED Mesh representation in the defined MED file
82 SetMeshInfo(const TMeshInfo& theInfo,
83 TErr* theErr = NULL) = 0;
85 //! Read a MEDWrapper MED Mesh representation by its number
88 GetPMeshInfo(TInt theId,
92 //----------------------------------------------------------------------------
93 //! Read number of MED Family entities in the defined MED file
96 GetNbFamilies(const TMeshInfo& theMeshInfo,
97 TErr* theErr = NULL) = 0;
99 //! Read number of attributes for defined MED Family
102 GetNbFamAttr(TInt theFamId,
103 const TMeshInfo& theInfo,
104 TErr* theErr = NULL) = 0;
106 //! Read number of MED Groups where MED Family with the number belong to
109 GetNbFamGroup(TInt theFamId,
110 const TMeshInfo& theInfo,
111 TErr* theErr = NULL) = 0;
113 //! Read a MEDWrapper MED Family representation by its number
116 GetFamilyInfo(TInt theFamId,
117 TFamilyInfo& theInfo,
118 TErr* theErr = NULL) = 0;
120 //! Write a MEDWrapper MED Family representation by its number
123 SetFamilyInfo(const TFamilyInfo& theInfo,
124 TErr* theErr = NULL) = 0;
126 //! Creates a MEDWrapper MED Family representation
129 CrFamilyInfo(const PMeshInfo& theMeshInfo,
133 const std::string& theValue = "") = 0;
135 //! Creates a MEDWrapper MED Family representation
138 CrFamilyInfo(const PMeshInfo& theMeshInfo,
139 const std::string& theValue,
141 const TStringSet& theGroupNames,
142 const TStringVector& theAttrDescs = TStringVector(),
143 const TIntVector& theAttrIds = TIntVector(),
144 const TIntVector& theAttrVals = TIntVector()) = 0;
146 //! A copy-constructor for the MEDWrapper MED Family representation
149 CrFamilyInfo(const PMeshInfo& theMeshInfo,
150 const PFamilyInfo& theInfo) = 0;
152 //! Write a MEDWrapper MED Family representation by its number
154 GetPFamilyInfo(const PMeshInfo& theMeshInfo,
156 TErr* theErr = NULL);
158 //----------------------------------------------------------------------------
159 //! Read sequence of names for any descendant of TElemInfo
162 GetNames(TElemInfo& theInfo,
164 EEntiteMaillage theEntity,
165 EGeometrieElement theGeom,
169 //! Read sequence of numerous for any descendant of TElemInfo
172 GetNumeration(TElemInfo& theInfo,
174 EEntiteMaillage theEntity,
175 EGeometrieElement theGeom,
179 //! Read sequence MED Family indexes for any descendant of TElemInfo
182 GetFamilies(TElemInfo& theInfo,
184 EEntiteMaillage theEntity,
185 EGeometrieElement theGeom,
189 //! Write sequence of names for any descendant of TElemInfo
192 SetNames(const TElemInfo& theInfo,
193 EEntiteMaillage theEntity,
194 EGeometrieElement theGeom,
198 //! Write sequence of numerous for any descendant of TElemInfo
201 SetNumeration(const TElemInfo& theInfo,
202 EEntiteMaillage theEntity,
203 EGeometrieElement theGeom,
207 //! Write sequence MED Family indexes for any descendant of TElemInfo
210 SetFamilies(const TElemInfo& theInfo,
211 EEntiteMaillage theEntity,
212 EGeometrieElement theGeom,
216 //! Read a MEDWrapper MED Element representation from defined MED file
218 GetPElemInfo(const PMeshInfo& theMeshInfo,
219 EEntiteMaillage theEntity = eNOEUD,
220 EGeometrieElement theGeom = ePOINT1,
221 EConnectivite theConnMode = eNOD,
222 TErr* theErr = NULL);
224 //----------------------------------------------------------------------------
225 //! Read number of nodes in defined MED Mesh
228 GetNbNodes(const TMeshInfo& theMeshInfo,
229 TErr* theErr = NULL) = 0;
233 GetNbNodes(const TMeshInfo& theMeshInfo,
240 //! Read a MEDWrapper MED Nodes representation from defined MED file
243 GetNodeInfo(TNodeInfo& theInfo,
244 TErr* theErr = NULL) = 0;
246 //! Write the MEDWrapper MED Nodes representation into defined MED file
249 SetNodeInfo(const TNodeInfo& theInfo,
250 TErr* theErr = NULL) = 0;
252 //! Creates a MEDWrapper MED Nodes representation
255 CrElemInfo(const PMeshInfo& theMeshInfo,
257 EBooleen theIsElemNum = eVRAI,
258 EBooleen theIsElemNames = eVRAI)
263 //! Creates a MEDWrapper MED Nodes representation
266 CrElemInfo(const PMeshInfo& theMeshInfo,
268 const TIntVector& theFamNum,
269 const TIntVector& aElemNum,
270 const TStringVector& aElemNames)
275 //! Creates a MEDWrapper MED Nodes representation
278 CrNodeInfo(const PMeshInfo& theMeshInfo,
280 EModeSwitch theMode = eFULL_INTERLACE,
281 ERepere theSystem = eCART,
282 EBooleen theIsElemNum = eVRAI,
283 EBooleen theIsElemNames = eVRAI) = 0;
285 //! Creates a MEDWrapper MED Nodes representation
288 CrNodeInfo(const PMeshInfo& theMeshInfo,
289 const TFloatVector& theNodeCoords,
290 EModeSwitch theMode = eFULL_INTERLACE,
291 ERepere theSystem = eCART,
292 const TStringVector& theCoordNames = TStringVector(),
293 const TStringVector& theCoordUnits = TStringVector(),
294 const TIntVector& theFamilyNums = TIntVector(),
295 const TIntVector& theElemNums = TIntVector(),
296 const TStringVector& theElemNames = TStringVector()) = 0;
298 //! A copy-constructor for the MEDWrapper MED Nodes representation
301 CrNodeInfo(const PMeshInfo& theMeshInfo,
302 const PNodeInfo& theInfo) = 0;
304 //! Read a MEDWrapper MED Nodes representation from defined MED file
306 GetPNodeInfo(const PMeshInfo& theMeshInfo,
307 TErr* theErr = NULL);
309 //----------------------------------------------------------------------------
310 //! Read a MEDWrapper MED Polygones representation from defined MED file
311 /*! This feature is supported only for version of 2.2 and higher */
314 GetPolygoneInfo(TPolygoneInfo& theInfo,
318 //! Write a MEDWrapper MED Polygones representation from defined MED file
319 /*! This feature is supported only for version of 2.2 and higher */
322 SetPolygoneInfo(const TPolygoneInfo& theInfo,
326 //! Read number of MED Polygones in defined MED Mesh
327 /*! This feature is supported only for version of 2.2 and higher */
330 GetNbPolygones(const TMeshInfo& theMeshInfo,
331 EEntiteMaillage theEntity,
332 EGeometrieElement theGeom,
333 EConnectivite theConnMode = eNOD,
339 //! Read connectivity infroamtion for the MED Polygones in defined MED Mesh
340 /*! This feature is supported only for version of 2.2 and higher */
343 GetPolygoneConnSize(const TMeshInfo& theMeshInfo,
344 EEntiteMaillage theEntity,
345 EGeometrieElement theGeom,
346 EConnectivite theConnMode = eNOD,
352 //! Creates a MEDWrapper MED Polygones representation
353 /*! This feature is supported only for version of 2.2 and higher */
356 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
357 EEntiteMaillage theEntity,
358 EGeometrieElement theGeom,
361 EConnectivite theConnMode = eNOD,
362 EBooleen theIsElemNum = eVRAI,
363 EBooleen theIsElemNames = eVRAI)
365 return PPolygoneInfo();
368 //! Creates a MEDWrapper MED Polygones representation
369 /*! This feature is supported only for version of 2.2 and higher */
372 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
373 EEntiteMaillage theEntity,
374 EGeometrieElement theGeom,
375 const TIntVector& theIndexes,
376 const TIntVector& theConnectivities,
377 EConnectivite theConnMode = eNOD,
378 const TIntVector& theFamilyNums = TIntVector(),
379 const TIntVector& theElemNums = TIntVector(),
380 const TStringVector& theElemNames = TStringVector())
382 return PPolygoneInfo();
385 //! A copy-constructor for the MEDWrapper MED Polygones representation
388 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
389 const PPolygoneInfo& theInfo)
391 return PPolygoneInfo();
394 //! Read a MEDWrapper MED Polygones representation from defined MED file
395 /*! This feature is support only for version of 2.2 and higher */
397 GetPPolygoneInfo(const PMeshInfo& theMeshInfo,
398 EEntiteMaillage theEntity,
399 EGeometrieElement theGeom,
400 EConnectivite theConnMode = eNOD);
402 //----------------------------------------------------------------------------
403 //! Read a MEDWrapper MED Polyedres representation from defined MED file
404 /*! This feature is support only for version of 2.2 and higher */
407 GetPolyedreInfo(TPolyedreInfo& theInfo,
411 //! Write a MEDWrapper MED Polyedres representation from defined MED file
412 /*! This feature is support only for version of 2.2 and higher */
415 SetPolyedreInfo(const TPolyedreInfo& theInfo,
419 //! Read number of MED Polyedres in defined MED Mesh
420 /*! This feature is support only for version of 2.2 and higher */
423 GetNbPolyedres(const TMeshInfo& theMeshInfo,
424 EEntiteMaillage theEntity,
425 EGeometrieElement theGeom,
426 EConnectivite theConnMode = eNOD,
432 //! Read connectivity infroamtion for the MED Polyedres in defined MED Mesh
433 /*! This feature is support only for version of 2.2 and higher */
436 GetPolyedreConnSize(const TMeshInfo& theMeshInfo,
439 EConnectivite theConnMode = eNOD,
442 theNbFaces = theConnSize = 0;
447 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
448 EEntiteMaillage theEntity,
449 EGeometrieElement theGeom,
453 EConnectivite theConnMode = eNOD,
454 EBooleen theIsElemNum = eVRAI,
455 EBooleen theIsElemNames = eVRAI)
457 return PPolyedreInfo();
460 //! Creates a MEDWrapper MED Polyedres representation
461 /*! This feature is support only for version of 2.2 and higher */
464 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
465 EEntiteMaillage theEntity,
466 EGeometrieElement theGeom,
467 const TIntVector& theIndexes,
468 const TIntVector& theFaces,
469 const TIntVector& theConnectivities,
470 EConnectivite theConnMode = eNOD,
471 const TIntVector& theFamilyNums = TIntVector(),
472 const TIntVector& theElemNums = TIntVector(),
473 const TStringVector& theElemNames = TStringVector())
475 return PPolyedreInfo();
478 //! A copy-constructor for the MEDWrapper MED Polyedres representation
481 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
482 const PPolyedreInfo& theInfo)
484 return PPolyedreInfo();
487 //! Read a MEDWrapper MED Polyedres representation from defined MED file
488 /*! This feature is support only for version of 2.2 and higher */
490 GetPPolyedreInfo(const PMeshInfo& theMeshInfo,
491 EEntiteMaillage theEntity,
492 EGeometrieElement theGeom,
493 EConnectivite theConnMode = eNOD);
495 //----------------------------------------------------------------------------
496 //! Get TEntityInfo which contains brief information about existing cells and their destribution among MED ENTITIES
499 GetEntityInfo(const TMeshInfo& theMeshInfo,
500 EConnectivite theConnMode = eNOD,
501 TErr* theErr = NULL) = 0;
503 //! Read number of cells for defined MED Mesh, ENTITY and geometrical type with define mode of connectivity
506 GetNbCells(const TMeshInfo& theMeshInfo,
507 EEntiteMaillage theEntity,
508 EGeometrieElement theGeom,
509 EConnectivite theConnMode = eNOD,
510 TErr* theErr = NULL) = 0;
512 //! Read a MEDWrapper MED Cells representation from defined MED file
515 GetCellInfo(TCellInfo& theInfo,
516 TErr* theErr = NULL) = 0;
518 //! Write the MEDWrapper MED Cells representation into defined MED file
521 SetCellInfo(const TCellInfo& theInfo,
522 TErr* theErr = NULL) = 0;
524 //! Creates a MEDWrapper MED Cells representation
527 CrCellInfo(const PMeshInfo& theMeshInfo,
528 EEntiteMaillage theEntity,
529 EGeometrieElement theGeom,
531 EConnectivite theConnMode = eNOD,
532 EBooleen theIsElemNum = eVRAI,
533 EBooleen theIsElemNames = eVRAI,
534 EModeSwitch theMode = eFULL_INTERLACE) = 0;
536 //! Creates a MEDWrapper MED Cells representation
539 CrCellInfo(const PMeshInfo& theMeshInfo,
540 EEntiteMaillage theEntity,
541 EGeometrieElement theGeom,
542 const TIntVector& theConnectivities,
543 EConnectivite theConnMode = eNOD,
544 const TIntVector& theFamilyNums = TIntVector(),
545 const TIntVector& theElemNums = TIntVector(),
546 const TStringVector& theElemNames = TStringVector(),
547 EModeSwitch theMode = eFULL_INTERLACE) = 0;
549 //! A copy-constructor for the MEDWrapper MED Cells representation
552 CrCellInfo(const PMeshInfo& theMeshInfo,
553 const PCellInfo& theInfo) = 0;
555 //! Read a MEDWrapper MED Cells representation from defined MED file
557 GetPCellInfo(const PMeshInfo& theMeshInfo,
558 EEntiteMaillage theEntity,
559 EGeometrieElement theGeom,
560 EConnectivite theConnMode = eNOD,
561 TErr* theErr = NULL);
563 //----------------------------------------------------------------------------
564 //! Read number of balls in the Mesh
565 /*! This feature is supported since version 3.0 */
568 GetNbBalls(const TMeshInfo& theMeshInfo)
573 //! Read a MEDWrapped representation of MED_BALL from the MED file
574 /*! This feature is supported since version 3.0 */
577 GetBallInfo(TBallInfo& theInfo,
581 //! Write a MEDWrapped representation of MED_BALL to the MED file
582 /*! This feature is supported since version 3.0 */
585 SetBallInfo(const TBallInfo& theInfo,
589 //! Creates a MEDWrapper MED Balls representation
590 /*! This feature is supported since version 3.0 */
593 CrBallInfo(const PMeshInfo& theMeshInfo,
595 EBooleen theIsElemNum = eVRAI)
600 //! Creates a MEDWrapper MED Balls representation
601 /*! This feature is supported since version 3.0 */
604 CrBallInfo(const PMeshInfo& theMeshInfo,
605 const TIntVector& theNodes,
606 TFloatVector& theDiameters,
607 const TIntVector& theFamilyNums = TIntVector(),
608 const TIntVector& theElemNums = TIntVector())
613 //! A copy-constructor for the MEDWrapped MED Balls representation
616 CrBallInfo(const PMeshInfo& theMeshInfo,
617 const PBallInfo& theInfo)
622 //! Read a MEDWrapped MED Balls representation from defined MED file
623 /*! This feature is supported since version 3.0 */
626 GetPBallInfo(const PMeshInfo& theMeshInfo);
628 //----------------------------------------------------------------------------
629 //! Read number of MED FIELDS in defined MED Mesh
632 GetNbFields(TErr* theErr = NULL) = 0;
634 //! Read number of components for the defined MED FIELD by its order number
637 GetNbComp(TInt theFieldId,
638 TErr* theErr = NULL) = 0;
640 //! Read MEDWrapper MED FIELD representation by its order number
643 GetFieldInfo(TInt theFieldId,
645 TErr* theErr = NULL) = 0;
647 //! Write MEDWrapper MED FIELD representation into defined MED file
650 SetFieldInfo(const TFieldInfo& theInfo,
651 TErr* theErr = NULL) = 0;
654 //! Creates a MEDWrapper MED FIELD representation
657 CrFieldInfo(const PMeshInfo& theMeshInfo,
659 ETypeChamp theType = eFLOAT64,
660 const std::string& theValue = "",
661 EBooleen theIsLocal = eVRAI,
662 TInt theNbRef = 1) = 0;
664 //! A copy-constructor for the MEDWrapper MED FIELD representation
667 CrFieldInfo(const PMeshInfo& theMeshInfo,
668 const PFieldInfo& theInfo) = 0;
670 //! Read a MEDWrapper MED FIELD representation from defined MED file
672 GetPFieldInfo(const PMeshInfo& theMeshInfo,
674 TErr* theErr = NULL);
677 //----------------------------------------------------------------------------
678 //! Read number of MED GAUSS in defined MED Mesh
679 /*! This feature is support only for version of 2.2 and higher */
682 GetNbGauss(TErr* theErr = NULL)
687 //! Read brief MED GAUSS information by its order number from defined MED Mesh
688 /*! This feature is support only for version of 2.2 and higher */
691 GetGaussPreInfo(TInt theId,
694 return TGaussInfo::TInfo( TGaussInfo::TKey(ePOINT1,""),0 );
697 //! Read a MEDWrapper MED GAUSS representation by its order number from defined MED file
698 /*! This feature is support only for version of 2.2 and higher */
701 GetGaussInfo(TInt theId,
706 //! Creates a MEDWrapper MED GAUSS representation
707 /*! This feature is support only for version of 2.2 and higher */
710 CrGaussInfo(const TGaussInfo::TInfo& theInfo,
711 EModeSwitch theMode = eFULL_INTERLACE) = 0;
714 //----------------------------------------------------------------------------
715 //! Read number of MED TIMESTAMPS in defined MED Mesh
717 By the way some additional information can be obtained:
718 - to what MED ENTITY the MED TIMESTAMP conntected to;
719 - on what geometrical types the MED TIMESTAMP defined to.
723 GetNbTimeStamps(const TFieldInfo& theInfo,
724 const TEntityInfo& theEntityInfo,
725 EEntiteMaillage& theEntity,
726 TGeom2Size& theGeom2Size,
727 TErr* theErr = NULL) = 0;
729 //! Read MEDWrapper MED TIMESTAMP representation by its order number
732 GetTimeStampInfo(TInt theTimeStampId,
733 TTimeStampInfo& theInfo,
734 TErr* theErr = NULL) = 0;
736 //! Creates a MEDWrapper MED TIMESTAMP representation
739 CrTimeStampInfo(const PFieldInfo& theFieldInfo,
740 EEntiteMaillage theEntity,
741 const TGeom2Size& theGeom2Size,
742 const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(),
746 const std::string& theUnitDt = "",
747 const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) = 0;
749 //! A copy-constructor for the MEDWrapper MED TIMESTAMP representation
752 CrTimeStampInfo(const PFieldInfo& theFieldInfo,
753 const PTimeStampInfo& theInfo) = 0;
755 //! Read MEDWrapper MED TIMESTAMP representation by its order number
757 GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
758 EEntiteMaillage theEntity,
759 const TGeom2Size& theGeom2Size,
761 TErr* theErr = NULL);
764 //----------------------------------------------------------------------------
765 //! Read number of MED PROFILES in defined MED Mesh
768 GetNbProfiles(TErr* theErr = NULL) = 0;
770 //! Read brief MED PROFILE information by its order number from defined MED Mesh
773 GetProfilePreInfo(TInt theId,
774 TErr* theErr = NULL) = 0;
776 //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file
779 GetProfileInfo(TInt theId,
780 TProfileInfo& theInfo,
781 TErr* theErr = NULL) = 0;
783 //! Creates a MEDWrapper MED PROFILE representation
786 CrProfileInfo(const TProfileInfo::TInfo& theInfo,
787 EModeProfil theMode = eCOMPACT) = 0;
789 //! Write a MEDWrapper MED PROFILE representation
792 SetProfileInfo(const TProfileInfo& theInfo,
793 TErr* theErr = NULL) = 0;
795 //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file
797 GetPProfileInfo(TInt theId,
798 EModeProfil theMode = eCOMPACT,
799 TErr* theErr = NULL);
802 //----------------------------------------------------------------------------
803 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
806 GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
807 const TMKey2Profile& theMKey2Profile,
808 const TKey2Gauss& theKey2Gauss,
809 TErr* theErr = NULL) = 0;
811 //! Write the values for MEDWrapper MED TIEMSTAMP to defined MED file
814 SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue,
815 TErr* theErr = NULL) = 0;
817 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
820 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
821 ETypeChamp theTypeChamp,
822 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
823 EModeSwitch theMode = eFULL_INTERLACE) = 0;
825 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
828 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
829 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
830 EModeSwitch theMode = eFULL_INTERLACE);
832 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
835 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
836 const PTimeStampValueBase& theInfo,
837 ETypeChamp theTypeChamp) = 0;
839 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
842 CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
843 const PTimeStampValueBase& theInfo);
845 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
847 GetPTimeStampValue(const PTimeStampInfo& theTimeStampInfo,
848 const TMKey2Profile& theMKey2Profile,
849 const TKey2Gauss& theKey2Gauss,
850 TErr* theErr = NULL);
852 //----------------------------------------------------------------------------
853 // Backward compatibility declarations
854 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
857 GetTimeStampVal(const PTimeStampVal& theVal,
858 const TMKey2Profile& theMKey2Profile,
859 const TKey2Gauss& theKey2Gauss,
860 TErr* theErr = NULL);
862 //! Write the values for MEDWrapper MED TIEMSTAMP to defined MED file
865 SetTimeStamp(const PTimeStampVal& theVal,
866 TErr* theErr = NULL);
868 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
871 CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
872 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
873 EModeSwitch theMode = eFULL_INTERLACE);
875 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
878 CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
879 const PTimeStampVal& theInfo);
881 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
883 GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
884 const TMKey2Profile& theMKey2Profile,
885 const TKey2Gauss& theKey2Gauss,
886 TErr* theErr = NULL);
888 //----------------------------------------------------------------------------
889 //! Read a MEDWrapper MED Grille representation from defined MED file
890 /*! This feature is support only for version of 2.2 and higher */
892 GetPGrilleInfo(const PMeshInfo& theMeshInfo);
894 //! Read a MEDWrapper MED Grille representation from defined MED file
895 /*! This feature is support only for version of 2.2 and higher */
897 GetPGrilleInfo(const PMeshInfo& theMeshInfo,
898 const PGrilleInfo& theInfo);
900 //! Read a MEDWrapper MED Grille representation from defined MED file
901 /*! This feature is support only for version of 2.2 and higher */
904 GetGrilleInfo(TGrilleInfo& theInfo,
908 //! Write the MEDWrapper MED Grille representation into defined MED file
909 /*! This feature is support only for version of 2.2 and higher */
912 SetGrilleInfo(const TGrilleInfo& theInfo,
916 /*! This feature is support only for version of 2.2 and higher */
919 CrGrilleInfo(const PMeshInfo& theMeshInfo,
920 const PGrilleInfo& theGrilleInfo)
922 return PGrilleInfo();
925 /*! This feature is support only for version of 2.2 and higher */
928 CrGrilleInfo(const PMeshInfo& theMeshInfo)
930 return PGrilleInfo();
933 /*! This feature is support only for version of 2.2 and higher */
936 CrGrilleInfo(const PMeshInfo& theMeshInfo,
937 const EGrilleType& type)
939 return PGrilleInfo();
942 /*! This feature is support only for version of 2.2 and higher */
945 CrGrilleInfo(const PMeshInfo& theMeshInfo,
946 const EGrilleType& type,
949 return PGrilleInfo();
952 /*! This feature is support only for version of 2.2 and higher */
955 CrGrilleInfo(const PMeshInfo& theMeshInfo,
956 const EGrilleType& type,
957 const MED::TIntVector& nbNodeVec)
959 return PGrilleInfo();
962 /*! This feature is support only for version of 2.2 and higher */
965 GetGrilleType(const TMeshInfo& theMeshInfo,
974 //----------------------------------------------------------------------------
975 //! This class provide thread-safety for MEDWrapper interaction
976 class MEDWRAPPER_EXPORT TLockProxy
978 TLockProxy& operator=(const TLockProxy& );
982 TLockProxy(TWrapper* theWrapper);
986 TWrapper * operator-> () const;
990 //----------------------------------------------------------------------------
991 //! To specialize the SharedPtr for TWrapper
993 class MEDWRAPPER_EXPORT SharedPtr<TWrapper>: public boost::shared_ptr<TWrapper>
999 explicit SharedPtr(Y * p):
1000 boost::shared_ptr<TWrapper>(p)
1004 SharedPtr(SharedPtr<Y> const & r):
1005 boost::shared_ptr<TWrapper>(boost::dynamic_pointer_cast<TWrapper,Y>(r))
1010 operator=(SharedPtr<Y> const & r)
1012 SharedPtr<TWrapper>(r).swap(*this);
1018 operator()(Y * p) // Y must be complete
1020 return operator=<Y>(SharedPtr<Y>(p));
1025 operator()(SharedPtr<Y> const & r) // Y must be complete
1027 return operator=<Y>(SharedPtr<Y>(r));
1030 TLockProxy operator-> () const // never throws
1032 return TLockProxy(this->get());
1036 operator const TWrapper& () const;
1038 operator TWrapper& ();
1040 TWrapper& operator* () const;
1042 TWrapper * get() const // never throws
1044 return boost::shared_ptr<TWrapper>::get();
1048 //----------------------------------------------------------------------------
1049 typedef SharedPtr<TWrapper> PWrapper;