Version: 9.16.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)
 
Toperator-> ()
 
const Toperator-> () const
 
Toperator* ()
 
const Toperator* () 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 109 of file AutoRefCnt.hxx.

Constructor & Destructor Documentation

◆ AutoCppPtr()

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

Definition at line 112 of file AutoRefCnt.hxx.

112:_ptr(ptr) { }

◆ ~AutoCppPtr()

template<class T >
YACS::BASES::AutoCppPtr< T >::~AutoCppPtr ( )
inline

Definition at line 113 of file AutoRefCnt.hxx.

113{ destroyPtr(); }

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

Member Function Documentation

◆ destroyPtr()

template<class T >
void YACS::BASES::AutoCppPtr< T >::destroyPtr ( )
inlineprivate

◆ operator const T *()

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

Definition at line 120 of file AutoRefCnt.hxx.

120{ return _ptr; }

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

◆ operator T*()

template<class T >
YACS::BASES::AutoCppPtr< T >::operator T* ( )
inline

Definition at line 119 of file AutoRefCnt.hxx.

119{ return _ptr; }

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

◆ operator*() [1/2]

template<class T >
T & YACS::BASES::AutoCppPtr< T >::operator* ( )
inline

Definition at line 117 of file AutoRefCnt.hxx.

117{ return *_ptr; }

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

◆ operator*() [2/2]

template<class T >
const T & YACS::BASES::AutoCppPtr< T >::operator* ( ) const
inline

Definition at line 118 of file AutoRefCnt.hxx.

118{ return *_ptr; }

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

◆ operator->() [1/2]

template<class T >
T * YACS::BASES::AutoCppPtr< T >::operator-> ( )
inline

Definition at line 115 of file AutoRefCnt.hxx.

115{ return _ptr ; }

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

◆ operator->() [2/2]

template<class T >
const T * YACS::BASES::AutoCppPtr< T >::operator-> ( ) const
inline

Definition at line 116 of file AutoRefCnt.hxx.

116{ return _ptr; }

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

◆ operator=()

template<class T >
AutoCppPtr & YACS::BASES::AutoCppPtr< T >::operator= ( T ptr)
inline

Definition at line 114 of file AutoRefCnt.hxx.

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

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

Member Data Documentation

◆ _ptr


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