MED::SharedPtr< T > Class Template Reference

To extend the boost::shared_ptr to support such features automatic dynamic cast. More...

#include <MED_SharedPtr.hxx>

Public Member Functions

 operator const T & () const
 To provide a flexible way to use reference to the wrapped pointer (const version) More...
 
 operator T& ()
 To provide a flexible way to use reference to the wrapped pointer. More...
 
template<class Y >
SharedPtroperator() (SharedPtr< Y > const &r)
 Introduce a flexible way to reset the wrapped pointer. More...
 
template<class Y >
SharedPtroperator() (Y *p)
 Introduce a flexible way to reset the wrapped pointer. More...
 
template<class Y >
SharedPtroperator= (SharedPtr< Y > const &r)
 Copy-constructor. More...
 
 SharedPtr ()
 Default constructor. More...
 
template<class Y >
 SharedPtr (SharedPtr< Y > const &r)
 Construct the class by any specialisation of the class. More...
 
template<class Y >
 SharedPtr (Y *p)
 Construct the class by any type of a pointer. More...
 

Detailed Description

template<class T>
class MED::SharedPtr< T >

To extend the boost::shared_ptr to support such features automatic dynamic cast.

All entities of the MEDWrapper package are handled as pointer. This class was introduced to provide correct and flexible memory management for all of the MEDWrapper objects.

Constructor & Destructor Documentation

◆ SharedPtr() [1/3]

template<class T >
MED::SharedPtr< T >::SharedPtr ( )

Default constructor.

◆ SharedPtr() [2/3]

template<class T >
template<class Y >
MED::SharedPtr< T >::SharedPtr ( Y *  p)
explicit

Construct the class by any type of a pointer.

◆ SharedPtr() [3/3]

template<class T >
template<class Y >
MED::SharedPtr< T >::SharedPtr ( SharedPtr< Y > const &  r)

Construct the class by any specialisation of the class.

Member Function Documentation

◆ operator const T &()

template<class T >
MED::SharedPtr< T >::operator const T & ( ) const

To provide a flexible way to use reference to the wrapped pointer (const version)

◆ operator T&()

template<class T >
MED::SharedPtr< T >::operator T& ( )

To provide a flexible way to use reference to the wrapped pointer.

◆ operator()() [1/2]

template<class T >
template<class Y >
SharedPtr & MED::SharedPtr< T >::operator() ( SharedPtr< Y > const &  r)

Introduce a flexible way to reset the wrapped pointer.

◆ operator()() [2/2]

template<class T >
template<class Y >
SharedPtr & MED::SharedPtr< T >::operator() ( Y *  p)

Introduce a flexible way to reset the wrapped pointer.

◆ operator=()

template<class T >
template<class Y >
SharedPtr & MED::SharedPtr< T >::operator= ( SharedPtr< Y > const &  r)

Copy-constructor.


The documentation for this class was generated from the following file: