This is Unofficial EPICS BASE Doxygen Site
autoPtrRecycle< T > Class Template Reference

#include "autoPtrRecycle.h"

Public Member Functions

 autoPtrRecycle (epicsGuard< epicsMutex > &, chronIntIdResTable< baseNMIU > &, cacRecycle &, T *)
 
 ~autoPtrRecycle ()
 
T & operator* () const
 
T * operator-> () const
 
T * get () const
 
T * release ()
 

Detailed Description

template<class T>
class autoPtrRecycle< T >

Definition at line 30 of file autoPtrRecycle.h.

Constructor & Destructor Documentation

template<class T >
autoPtrRecycle< T >::autoPtrRecycle ( epicsGuard< epicsMutex > &  guardIn,
chronIntIdResTable< baseNMIU > &  tbl,
cacRecycle rIn,
T *  pIn 
)
inline

Definition at line 51 of file autoPtrRecycle.h.

53  :
54  p ( pIn ), r ( rIn ), ioTable ( tbl ), guard ( guardIn ) {}
template<class T >
autoPtrRecycle< T >::~autoPtrRecycle ( )
inline

Definition at line 57 of file autoPtrRecycle.h.

58 {
59  if ( this->p ) {
60  baseNMIU *pb = this->p;
61  this->ioTable.remove ( *pb );
62  pb->destroy ( this->guard, this->r );
63  }
64 }
Definition: netIO.h:44
virtual void destroy(epicsGuard< epicsMutex > &, class cacRecycle &)=0
T * remove(const ID &idIn)
Definition: resourceLib.h:297

Member Function Documentation

template<class T >
T * autoPtrRecycle< T >::get ( ) const
inline

Definition at line 79 of file autoPtrRecycle.h.

80 {
81  return this->p;
82 }
template<class T >
T & autoPtrRecycle< T >::operator* ( ) const
inline

Definition at line 67 of file autoPtrRecycle.h.

68 {
69  return * this->p;
70 }
template<class T >
T * autoPtrRecycle< T >::operator-> ( ) const
inline

Definition at line 73 of file autoPtrRecycle.h.

74 {
75  return this->p;
76 }
template<class T >
T * autoPtrRecycle< T >::release ( )
inline

Definition at line 85 of file autoPtrRecycle.h.

86 {
87  T *pTmp = this->p;
88  this->p = 0;
89  return pTmp;
90 }

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