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_Wrapper_HeaderFile
30 #define MED_Wrapper_HeaderFile
32 #include "MED_Structures.hxx"
33 #include "MED_Algorithm.hxx"
35 #include <boost/thread/mutex.hpp>
40 //----------------------------------------------------------------------------
41 //! Define a base class that wraps the MED API
44 typedef boost::mutex TMutex;
45 //! This is a syncronization primitive which allow to support thread safety for the MED access
48 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49 //! Creates a MEDWrapper MED Mesh representation
52 CrMeshInfo(TInt theDim = 0,
53 const std::string& theValue = "",
54 EMaillage theType = eNON_STRUCTURE,
55 const std::string& theDesc = "") = 0;
57 //! A copy-constructor for the MEDWrapper MED Mesh representation
60 CrMeshInfo(const PMeshInfo& theInfo) = 0;
62 //! Read number of MED Mesh entities in the defined MED file
65 GetNbMeshes(TErr* theErr = NULL) = 0;
67 //! Read a MEDWrapper MED Mesh representation by its number
70 GetMeshInfo(TInt theMeshId,
72 TErr* theErr = NULL) = 0;
74 //! Write the MEDWrapper MED Mesh representation in the defined MED file
77 SetMeshInfo(const TMeshInfo& theInfo,
78 TErr* theErr = NULL) = 0;
80 //! Read a MEDWrapper MED Mesh representation by its number
83 GetPMeshInfo(TInt theId,
87 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88 //! Read number of MED Family entities in the defined MED file
91 GetNbFamilies(const TMeshInfo& theMeshInfo,
92 TErr* theErr = NULL) = 0;
94 //! Read number of attributes for defined MED Family
97 GetNbFamAttr(TInt theFamId,
98 const TMeshInfo& theInfo,
99 TErr* theErr = NULL) = 0;
101 //! Read number of MED Groups where MED Family with the number belong to
104 GetNbFamGroup(TInt theFamId,
105 const TMeshInfo& theInfo,
106 TErr* theErr = NULL) = 0;
108 //! Read a MEDWrapper MED Family representation by its number
111 GetFamilyInfo(TInt theFamId,
112 TFamilyInfo& theInfo,
113 TErr* theErr = NULL) = 0;
115 //! Write a MEDWrapper MED Family representation by its number
118 SetFamilyInfo(const TFamilyInfo& theInfo,
119 TErr* theErr = NULL) = 0;
121 //! Creates a MEDWrapper MED Family representation
124 CrFamilyInfo(const PMeshInfo& theMeshInfo,
128 const std::string& theValue = "") = 0;
130 //! Creates a MEDWrapper MED Family representation
133 CrFamilyInfo(const PMeshInfo& theMeshInfo,
134 const std::string& theValue,
136 const TStringSet& theGroupNames,
137 const TStringVector& theAttrDescs = TStringVector(),
138 const TIntVector& theAttrIds = TIntVector(),
139 const TIntVector& theAttrVals = TIntVector()) = 0;
141 //! A copy-constructor for the MEDWrapper MED Family representation
144 CrFamilyInfo(const PMeshInfo& theMeshInfo,
145 const PFamilyInfo& theInfo) = 0;
147 //! Write a MEDWrapper MED Family representation by its number
149 GetPFamilyInfo(const PMeshInfo& theMeshInfo,
151 TErr* theErr = NULL);
153 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154 //! Read sequence of names for any descendant of TElemInfo
157 GetNames(TElemInfo& theInfo,
159 EEntiteMaillage theEntity,
160 EGeometrieElement theGeom,
164 //! Read sequence of numerous for any descendant of TElemInfo
167 GetNumeration(TElemInfo& theInfo,
169 EEntiteMaillage theEntity,
170 EGeometrieElement theGeom,
174 //! Read sequence MED Family indexes for any descendant of TElemInfo
177 GetFamilies(TElemInfo& theInfo,
179 EEntiteMaillage theEntity,
180 EGeometrieElement theGeom,
184 //! Write sequence of names for any descendant of TElemInfo
187 SetNames(const TElemInfo& theInfo,
188 EEntiteMaillage theEntity,
189 EGeometrieElement theGeom,
193 //! Write sequence of numerous for any descendant of TElemInfo
196 SetNumeration(const TElemInfo& theInfo,
197 EEntiteMaillage theEntity,
198 EGeometrieElement theGeom,
202 //! Write sequence MED Family indexes for any descendant of TElemInfo
205 SetFamilies(const TElemInfo& theInfo,
206 EEntiteMaillage theEntity,
207 EGeometrieElement theGeom,
211 //! Read a MEDWrapper MED Element representation from defined MED file
213 GetPElemInfo(const PMeshInfo& theMeshInfo,
214 EEntiteMaillage theEntity = eNOEUD,
215 EGeometrieElement theGeom = ePOINT1,
216 EConnectivite theConnMode = eNOD,
217 TErr* theErr = NULL);
219 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220 //! Read number of nodes in defined MED Mesh
223 GetNbNodes(const TMeshInfo& theMeshInfo,
224 TErr* theErr = NULL) = 0;
228 GetNbNodes(const TMeshInfo& theMeshInfo,
235 //! Read a MEDWrapper MED Nodes representation from defined MED file
238 GetNodeInfo(TNodeInfo& theInfo,
239 TErr* theErr = NULL) = 0;
241 //! Write the MEDWrapper MED Nodes representation into defined MED file
244 SetNodeInfo(const TNodeInfo& theInfo,
245 TErr* theErr = NULL) = 0;
247 //! Creates a MEDWrapper MED Nodes representation
250 CrElemInfo(const PMeshInfo& theMeshInfo,
252 EBooleen theIsElemNum = eVRAI,
253 EBooleen theIsElemNames = eVRAI)
258 //! Creates a MEDWrapper MED Nodes representation
261 CrElemInfo(const PMeshInfo& theMeshInfo,
263 const TIntVector& theFamNum,
264 const TIntVector& aElemNum,
265 const TStringVector& aElemNames)
270 //! Creates a MEDWrapper MED Nodes representation
273 CrNodeInfo(const PMeshInfo& theMeshInfo,
275 EModeSwitch theMode = eFULL_INTERLACE,
276 ERepere theSystem = eCART,
277 EBooleen theIsElemNum = eVRAI,
278 EBooleen theIsElemNames = eVRAI) = 0;
280 //! Creates a MEDWrapper MED Nodes representation
283 CrNodeInfo(const PMeshInfo& theMeshInfo,
284 const TFloatVector& theNodeCoords,
285 EModeSwitch theMode = eFULL_INTERLACE,
286 ERepere theSystem = eCART,
287 const TStringVector& theCoordNames = TStringVector(),
288 const TStringVector& theCoordUnits = TStringVector(),
289 const TIntVector& theFamilyNums = TIntVector(),
290 const TIntVector& theElemNums = TIntVector(),
291 const TStringVector& theElemNames = TStringVector()) = 0;
293 //! A copy-constructor for the MEDWrapper MED Nodes representation
296 CrNodeInfo(const PMeshInfo& theMeshInfo,
297 const PNodeInfo& theInfo) = 0;
299 //! Read a MEDWrapper MED Nodes representation from defined MED file
301 GetPNodeInfo(const PMeshInfo& theMeshInfo,
302 TErr* theErr = NULL);
304 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305 //! Read a MEDWrapper MED Polygones representation from defined MED file
306 /*! This feature is support only for version of 2.2 and higher */
309 GetPolygoneInfo(TPolygoneInfo& theInfo,
313 //! Write a MEDWrapper MED Polygones representation from defined MED file
314 /*! This feature is support only for version of 2.2 and higher */
317 SetPolygoneInfo(const TPolygoneInfo& theInfo,
321 //! Read number of MED Polygones in defined MED Mesh
322 /*! This feature is support only for version of 2.2 and higher */
325 GetNbPolygones(const TMeshInfo& theMeshInfo,
326 EEntiteMaillage theEntity,
327 EGeometrieElement theGeom,
328 EConnectivite theConnMode = eNOD,
334 //! Read connectivity infroamtion for the MED Polygones in defined MED Mesh
335 /*! This feature is support only for version of 2.2 and higher */
338 GetPolygoneConnSize(const TMeshInfo& theMeshInfo,
339 EEntiteMaillage theEntity,
340 EGeometrieElement theGeom,
341 EConnectivite theConnMode = eNOD,
347 //! Creates a MEDWrapper MED Polygones representation
348 /*! This feature is support only for version of 2.2 and higher */
351 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
352 EEntiteMaillage theEntity,
353 EGeometrieElement theGeom,
356 EConnectivite theConnMode = eNOD,
357 EBooleen theIsElemNum = eVRAI,
358 EBooleen theIsElemNames = eVRAI)
360 return PPolygoneInfo();
363 //! Creates a MEDWrapper MED Polygones representation
364 /*! This feature is support only for version of 2.2 and higher */
367 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
368 EEntiteMaillage theEntity,
369 EGeometrieElement theGeom,
370 const TIntVector& theIndexes,
371 const TIntVector& theConnectivities,
372 EConnectivite theConnMode = eNOD,
373 const TIntVector& theFamilyNums = TIntVector(),
374 const TIntVector& theElemNums = TIntVector(),
375 const TStringVector& theElemNames = TStringVector())
377 return PPolygoneInfo();
380 //! A copy-constructor for the MEDWrapper MED Polygones representation
383 CrPolygoneInfo(const PMeshInfo& theMeshInfo,
384 const PPolygoneInfo& theInfo)
386 return PPolygoneInfo();
389 //! Read a MEDWrapper MED Polygones representation from defined MED file
390 /*! This feature is support only for version of 2.2 and higher */
392 GetPPolygoneInfo(const PMeshInfo& theMeshInfo,
393 EEntiteMaillage theEntity,
394 EGeometrieElement theGeom,
395 EConnectivite theConnMode = eNOD);
397 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
398 //! Read a MEDWrapper MED Polyedres representation from defined MED file
399 /*! This feature is support only for version of 2.2 and higher */
402 GetPolyedreInfo(TPolyedreInfo& theInfo,
406 //! Write a MEDWrapper MED Polyedres representation from defined MED file
407 /*! This feature is support only for version of 2.2 and higher */
410 SetPolyedreInfo(const TPolyedreInfo& theInfo,
414 //! Read number of MED Polyedres in defined MED Mesh
415 /*! This feature is support only for version of 2.2 and higher */
418 GetNbPolyedres(const TMeshInfo& theMeshInfo,
419 EEntiteMaillage theEntity,
420 EGeometrieElement theGeom,
421 EConnectivite theConnMode = eNOD,
427 //! Read connectivity infroamtion for the MED Polyedres in defined MED Mesh
428 /*! This feature is support only for version of 2.2 and higher */
431 GetPolyedreConnSize(const TMeshInfo& theMeshInfo,
434 EConnectivite theConnMode = eNOD,
437 theNbFaces = theConnSize = 0;
442 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
443 EEntiteMaillage theEntity,
444 EGeometrieElement theGeom,
448 EConnectivite theConnMode = eNOD,
449 EBooleen theIsElemNum = eVRAI,
450 EBooleen theIsElemNames = eVRAI)
452 return PPolyedreInfo();
455 //! Creates a MEDWrapper MED Polyedres representation
456 /*! This feature is support only for version of 2.2 and higher */
459 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
460 EEntiteMaillage theEntity,
461 EGeometrieElement theGeom,
462 const TIntVector& theIndexes,
463 const TIntVector& theFaces,
464 const TIntVector& theConnectivities,
465 EConnectivite theConnMode = eNOD,
466 const TIntVector& theFamilyNums = TIntVector(),
467 const TIntVector& theElemNums = TIntVector(),
468 const TStringVector& theElemNames = TStringVector())
470 return PPolyedreInfo();
473 //! A copy-constructor for the MEDWrapper MED Polyedres representation
476 CrPolyedreInfo(const PMeshInfo& theMeshInfo,
477 const PPolyedreInfo& theInfo)
479 return PPolyedreInfo();
482 //! Read a MEDWrapper MED Polyedres representation from defined MED file
483 /*! This feature is support only for version of 2.2 and higher */
485 GetPPolyedreInfo(const PMeshInfo& theMeshInfo,
486 EEntiteMaillage theEntity,
487 EGeometrieElement theGeom,
488 EConnectivite theConnMode = eNOD);
490 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
491 //! Get TEntityInfo which contains brief information about existing cells and their destribution among MED ENTITIES
494 GetEntityInfo(const TMeshInfo& theMeshInfo,
495 EConnectivite theConnMode = eNOD,
496 TErr* theErr = NULL) = 0;
498 //! Read number of cells for defined MED Mesh, ENTITY and geometrical type with define mode of connectivity
501 GetNbCells(const TMeshInfo& theMeshInfo,
502 EEntiteMaillage theEntity,
503 EGeometrieElement theGeom,
504 EConnectivite theConnMode = eNOD,
505 TErr* theErr = NULL) = 0;
507 //! Read a MEDWrapper MED Cells representation from defined MED file
510 GetCellInfo(TCellInfo& theInfo,
511 TErr* theErr = NULL) = 0;
513 //! Write the MEDWrapper MED Cells representation into defined MED file
516 SetCellInfo(const TCellInfo& theInfo,
517 TErr* theErr = NULL) = 0;
519 //! Creates a MEDWrapper MED Cells representation
522 CrCellInfo(const PMeshInfo& theMeshInfo,
523 EEntiteMaillage theEntity,
524 EGeometrieElement theGeom,
526 EConnectivite theConnMode = eNOD,
527 EBooleen theIsElemNum = eVRAI,
528 EBooleen theIsElemNames = eVRAI,
529 EModeSwitch theMode = eFULL_INTERLACE) = 0;
531 //! Creates a MEDWrapper MED Cells representation
534 CrCellInfo(const PMeshInfo& theMeshInfo,
535 EEntiteMaillage theEntity,
536 EGeometrieElement theGeom,
537 const TIntVector& theConnectivities,
538 EConnectivite theConnMode = eNOD,
539 const TIntVector& theFamilyNums = TIntVector(),
540 const TIntVector& theElemNums = TIntVector(),
541 const TStringVector& theElemNames = TStringVector(),
542 EModeSwitch theMode = eFULL_INTERLACE) = 0;
544 //! A copy-constructor for the MEDWrapper MED Cells representation
547 CrCellInfo(const PMeshInfo& theMeshInfo,
548 const PCellInfo& theInfo) = 0;
550 //! Read a MEDWrapper MED Cells representation from defined MED file
552 GetPCellInfo(const PMeshInfo& theMeshInfo,
553 EEntiteMaillage theEntity,
554 EGeometrieElement theGeom,
555 EConnectivite theConnMode = eNOD,
556 TErr* theErr = NULL);
559 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
560 //! Read number of MED FIELDS in defined MED Mesh
563 GetNbFields(TErr* theErr = NULL) = 0;
565 //! Read number of components for the defined MED FIELD by its order number
568 GetNbComp(TInt theFieldId,
569 TErr* theErr = NULL) = 0;
571 //! Read MEDWrapper MED FIELD representation by its order number
574 GetFieldInfo(TInt theFieldId,
576 TErr* theErr = NULL) = 0;
578 //! Write MEDWrapper MED FIELD representation into defined MED file
581 SetFieldInfo(const TFieldInfo& theInfo,
582 TErr* theErr = NULL) = 0;
585 //! Creates a MEDWrapper MED FIELD representation
588 CrFieldInfo(const PMeshInfo& theMeshInfo,
590 ETypeChamp theType = eFLOAT64,
591 const std::string& theValue = "",
592 EBooleen theIsLocal = eVRAI,
593 TInt theNbRef = 1) = 0;
595 //! A copy-constructor for the MEDWrapper MED FIELD representation
598 CrFieldInfo(const PMeshInfo& theMeshInfo,
599 const PFieldInfo& theInfo) = 0;
601 //! Read a MEDWrapper MED FIELD representation from defined MED file
603 GetPFieldInfo(const PMeshInfo& theMeshInfo,
605 TErr* theErr = NULL);
608 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
609 //! Read number of MED GAUSS in defined MED Mesh
610 /*! This feature is support only for version of 2.2 and higher */
613 GetNbGauss(TErr* theErr = NULL)
618 //! Read brief MED GAUSS information by its order number from defined MED Mesh
619 /*! This feature is support only for version of 2.2 and higher */
622 GetGaussPreInfo(TInt theId,
625 return TGaussInfo::TInfo();
628 //! Read a MEDWrapper MED GAUSS representation by its order number from defined MED file
629 /*! This feature is support only for version of 2.2 and higher */
632 GetGaussInfo(TInt theId,
637 //! Creates a MEDWrapper MED GAUSS representation
638 /*! This feature is support only for version of 2.2 and higher */
641 CrGaussInfo(const TGaussInfo::TInfo& theInfo,
642 EModeSwitch theMode = eFULL_INTERLACE) = 0;
645 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
646 //! Read number of MED TIMESTAMPS in defined MED Mesh
648 By the way some additional information can be obtained:
649 - to what MED ENTITY the MED TIMESTAMP conntected to;
650 - on what geometrical types the MED TIMESTAMP defined to.
654 GetNbTimeStamps(const TFieldInfo& theInfo,
655 const TEntityInfo& theEntityInfo,
656 EEntiteMaillage& theEntity,
657 TGeom2Size& theGeom2Size,
658 TErr* theErr = NULL) = 0;
660 //! Read MEDWrapper MED TIMESTAMP representation by its order number
663 GetTimeStampInfo(TInt theTimeStampId,
664 TTimeStampInfo& theInfo,
665 TErr* theErr = NULL) = 0;
667 //! Creates a MEDWrapper MED TIMESTAMP representation
670 CrTimeStampInfo(const PFieldInfo& theFieldInfo,
671 EEntiteMaillage theEntity,
672 const TGeom2Size& theGeom2Size,
673 const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(),
677 const std::string& theUnitDt = "",
678 const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) = 0;
680 //! A copy-constructor for the MEDWrapper MED TIMESTAMP representation
683 CrTimeStampInfo(const PFieldInfo& theFieldInfo,
684 const PTimeStampInfo& theInfo) = 0;
686 //! Read MEDWrapper MED TIMESTAMP representation by its order number
688 GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
689 EEntiteMaillage theEntity,
690 const TGeom2Size& theGeom2Size,
692 TErr* theErr = NULL);
695 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
696 //! Read number of MED PROFILES in defined MED Mesh
699 GetNbProfiles(TErr* theErr = NULL) = 0;
701 //! Read brief MED PROFILE information by its order number from defined MED Mesh
704 GetProfilePreInfo(TInt theId,
705 TErr* theErr = NULL) = 0;
707 //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file
710 GetProfileInfo(TInt theId,
711 TProfileInfo& theInfo,
712 TErr* theErr = NULL) = 0;
714 //! Creates a MEDWrapper MED PROFILE representation
717 CrProfileInfo(const TProfileInfo::TInfo& theInfo,
718 EModeProfil theMode = eCOMPACT) = 0;
720 //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file
722 GetPProfileInfo(TInt theId,
723 EModeProfil theMode = eCOMPACT,
724 TErr* theErr = NULL);
727 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
728 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
731 GetTimeStampVal(TTimeStampVal& theVal,
732 const TMKey2Profile& theMKey2Profile,
733 const TKey2Gauss& theKey2Gauss,
734 TErr* theErr = NULL) = 0;
736 //! Write the values for MEDWrapper MED TIEMSTAMP to defined MED file
739 SetTimeStamp(const TTimeStampVal& theTimeStampVal,
740 TErr* theErr = NULL) = 0;
742 //! Creates the values for MEDWrapper MED TIEMSTAMP representation
745 CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
746 const TGeom2Profile& theGeom2Profile = TGeom2Profile(),
747 EModeSwitch theMode = eFULL_INTERLACE) = 0;
749 //! A copy-constructor for the values for MEDWrapper MED TIEMSTAMP representation
752 CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
753 const PTimeStampVal& theInfo) = 0;
755 //! Read the values for MEDWrapper MED TIEMSTAMP from defined MED file
757 GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
758 const TMKey2Profile& theMKey2Profile,
759 const TKey2Gauss& theKey2Gauss,
760 TErr* theErr = NULL);
762 //! Read a MEDWrapper MED Grille representation from defined MED file
763 /*! This feature is support only for version of 2.2 and higher */
765 GetPGrilleInfo(const PMeshInfo& theMeshInfo);
767 //! Read a MEDWrapper MED Grille representation from defined MED file
768 /*! This feature is support only for version of 2.2 and higher */
770 GetPGrilleInfo(const PMeshInfo& theMeshInfo,
771 const PGrilleInfo& theInfo);
773 //! Read a MEDWrapper MED Grille representation from defined MED file
774 /*! This feature is support only for version of 2.2 and higher */
777 GetGrilleInfo(TGrilleInfo& theInfo,
781 //! Write the MEDWrapper MED Grille representation into defined MED file
782 /*! This feature is support only for version of 2.2 and higher */
785 SetGrilleInfo(const TGrilleInfo& theInfo,
789 /*! This feature is support only for version of 2.2 and higher */
792 CrGrilleInfo(const PMeshInfo& theMeshInfo,
793 const PGrilleInfo& theGrilleInfo)
795 return PGrilleInfo();
798 /*! This feature is support only for version of 2.2 and higher */
801 CrGrilleInfo(const PMeshInfo& theMeshInfo)
803 return PGrilleInfo();
806 /*! This feature is support only for version of 2.2 and higher */
809 CrGrilleInfo(const PMeshInfo& theMeshInfo,
810 const EGrilleType& type)
812 return PGrilleInfo();
815 /*! This feature is support only for version of 2.2 and higher */
818 CrGrilleInfo(const PMeshInfo& theMeshInfo,
819 const EGrilleType& type,
822 return PGrilleInfo();
825 /*! This feature is support only for version of 2.2 and higher */
828 CrGrilleInfo(const PMeshInfo& theMeshInfo,
829 const EGrilleType& type,
830 const MED::TIntVector& nbNodeVec)
832 return PGrilleInfo();
835 /*! This feature is support only for version of 2.2 and higher */
838 GetGrilleType(const TMeshInfo& theMeshInfo,
847 //----------------------------------------------------------------------------
848 //! This class provide thread-safety for MEDWrapper interaction
851 TLockProxy& operator=(const TLockProxy& );
855 TLockProxy(TWrapper* theWrapper);
859 TWrapper * operator-> () const;
863 //----------------------------------------------------------------------------
864 //! To specialize the SharedPtr for TWrapper
866 class SharedPtr<TWrapper>: public boost::shared_ptr<TWrapper>
872 explicit SharedPtr(Y * p):
873 boost::shared_ptr<TWrapper>(p)
877 SharedPtr(SharedPtr<Y> const & r):
878 boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag())
883 operator=(SharedPtr<Y> const & r)
885 boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag()).swap(*this);
891 operator()(Y * p) // Y must be complete
893 return operator=<Y>(SharedPtr<Y>(p));
898 operator()(SharedPtr<Y> const & r) // Y must be complete
900 return operator=<Y>(SharedPtr<Y>(r));
903 TLockProxy operator-> () const // never throws
905 return TLockProxy(this->get());
909 operator const TWrapper& () const;
911 operator TWrapper& ();
913 TWrapper& operator* () const;
915 TWrapper * get() const // never throws
917 return boost::shared_ptr<TWrapper>::get();
921 //----------------------------------------------------------------------------
922 typedef SharedPtr<TWrapper> PWrapper;