Back to index

salome-med  6.5.0
Public Member Functions | Private Member Functions | Private Attributes
ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T > Class Template Reference

#include <MEDCouplingAutoRefCountObjectPtr.hxx>

Inheritance diagram for ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MEDCouplingAutoRefCountObjectPtr (const MEDCouplingAutoRefCountObjectPtr &other)
 MEDCouplingAutoRefCountObjectPtr (T *ptr=0)
 ~MEDCouplingAutoRefCountObjectPtr ()
bool operator== (const MEDCouplingAutoRefCountObjectPtr &other)
MEDCouplingAutoRefCountObjectPtroperator= (const MEDCouplingAutoRefCountObjectPtr &other)
MEDCouplingAutoRefCountObjectPtroperator= (T *ptr)
T * operator-> ()
const T * operator-> () const
T & operator* ()
const T & operator* () const
 operator T * ()
 operator const T * () const

Private Member Functions

void referPtr (T *ptr)
void destroyPtr ()

Private Attributes

T * _ptr

Detailed Description

template<class T>
class ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >

Definition at line 28 of file MEDCouplingAutoRefCountObjectPtr.hxx.


Constructor & Destructor Documentation

Definition at line 31 of file MEDCouplingAutoRefCountObjectPtr.hxx.

:_ptr(0) { referPtr(other._ptr); }
template<class T>
ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::MEDCouplingAutoRefCountObjectPtr ( T *  ptr = 0) [inline]

Definition at line 32 of file MEDCouplingAutoRefCountObjectPtr.hxx.

:_ptr(ptr) { }

Definition at line 33 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ destroyPtr(); }

Member Function Documentation

template<class T>
void ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::destroyPtr ( ) [inline, private]

Definition at line 45 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ if(_ptr) _ptr->decrRef(); }

Here is the caller graph for this function:

template<class T>
ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator const T * ( ) const [inline]

Definition at line 42 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return _ptr; }
template<class T>
ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator T * ( ) [inline]

Definition at line 41 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return _ptr; }
template<class T>
T& ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator* ( ) [inline]

Definition at line 39 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return *_ptr; }
template<class T>
const T& ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator* ( ) const [inline]

Definition at line 40 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return *_ptr; }
template<class T>
T* ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator-> ( ) [inline]

Definition at line 37 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return _ptr ; }
template<class T>
const T* ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator-> ( ) const [inline]

Definition at line 38 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return _ptr; }
template<class T>
MEDCouplingAutoRefCountObjectPtr& ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator= ( const MEDCouplingAutoRefCountObjectPtr< T > &  other) [inline]

Definition at line 35 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ if(_ptr!=other._ptr) { destroyPtr(); referPtr(other._ptr); } return *this; }
template<class T>
MEDCouplingAutoRefCountObjectPtr& ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator= ( T *  ptr) [inline]

Definition at line 36 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ if(_ptr!=ptr) { destroyPtr(); _ptr=ptr; } return *this; }
template<class T>
bool ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::operator== ( const MEDCouplingAutoRefCountObjectPtr< T > &  other) [inline]

Definition at line 34 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ return _ptr==other._ptr; }
template<class T>
void ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::referPtr ( T *  ptr) [inline, private]

Definition at line 44 of file MEDCouplingAutoRefCountObjectPtr.hxx.

{ _ptr=ptr; if(_ptr) _ptr->incrRef(); }

Here is the caller graph for this function:


Member Data Documentation

template<class T>
T* ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr< T >::_ptr [private]

Definition at line 47 of file MEDCouplingAutoRefCountObjectPtr.hxx.


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