Version: 8.3.0
YACS::BASES::AutoCppPtr< T > Class Template Reference

#include <AutoRefCnt.hxx>

Collaboration diagram for YACS::BASES::AutoCppPtr< T >:

Public Member Functions

 AutoCppPtr (T *ptr=0)
 
 ~AutoCppPtr ()
 
AutoCppPtroperator= (T *ptr)
 
T * operator-> ()
 
const T * operator-> () const
 
T & operator* ()
 
const T & operator* () const
 
 operator T * ()
 
 operator const T * () const
 

Private Member Functions

void destroyPtr ()
 

Private Attributes

T * _ptr
 

Detailed Description

template<class T>
class YACS::BASES::AutoCppPtr< T >

Definition at line 79 of file AutoRefCnt.hxx.

Constructor & Destructor Documentation

template<class T>
YACS::BASES::AutoCppPtr< T >::AutoCppPtr ( T *  ptr = 0)
inline

Definition at line 82 of file AutoRefCnt.hxx.

82 :_ptr(ptr) { }
template<class T>
YACS::BASES::AutoCppPtr< T >::~AutoCppPtr ( )
inline

Definition at line 83 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::destroyPtr().

83 { destroyPtr(); }

Member Function Documentation

template<class T>
void YACS::BASES::AutoCppPtr< T >::destroyPtr ( )
inlineprivate
template<class T>
YACS::BASES::AutoCppPtr< T >::operator const T * ( ) const
inline

Definition at line 90 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr.

90 { return _ptr; }
template<class T>
YACS::BASES::AutoCppPtr< T >::operator T * ( )
inline

Definition at line 89 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr.

89 { return _ptr; }
template<class T>
T& YACS::BASES::AutoCppPtr< T >::operator* ( )
inline

Definition at line 87 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr.

87 { return *_ptr; }
template<class T>
const T& YACS::BASES::AutoCppPtr< T >::operator* ( ) const
inline

Definition at line 88 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr.

88 { return *_ptr; }
template<class T>
T* YACS::BASES::AutoCppPtr< T >::operator-> ( )
inline

Definition at line 85 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr.

85 { return _ptr ; }
template<class T>
const T* YACS::BASES::AutoCppPtr< T >::operator-> ( ) const
inline

Definition at line 86 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr.

86 { return _ptr; }
template<class T>
AutoCppPtr& YACS::BASES::AutoCppPtr< T >::operator= ( T *  ptr)
inline

Definition at line 84 of file AutoRefCnt.hxx.

References YACS::BASES::AutoCppPtr< T >::_ptr, and YACS::BASES::AutoCppPtr< T >::destroyPtr().

84 { if(_ptr!=ptr) { destroyPtr(); _ptr=ptr; } return *this; }

Member Data Documentation


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