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

#include "sgAutoPtr.h"

Public Member Functions

 sgAutoPtr (epicsGuard< epicsMutex > &, struct CASG &)
 
 ~sgAutoPtr ()
 
sgAutoPtr< T > & operator= (T *)
 
T * operator-> ()
 
T & operator* ()
 
T * get ()
 
T * release ()
 

Detailed Description

template<class T>
class sgAutoPtr< T >

Definition at line 29 of file sgAutoPtr.h.

Constructor & Destructor Documentation

template<class T >
sgAutoPtr< T >::sgAutoPtr ( epicsGuard< epicsMutex > &  guardIn,
struct CASG sgIn 
)
inline

Definition at line 46 of file sgAutoPtr.h.

47  :
48  pNotify ( 0 ), sg ( sgIn ), guard ( guardIn )
49 {
50 }
template<class T >
sgAutoPtr< T >::~sgAutoPtr ( )
inline

Definition at line 53 of file sgAutoPtr.h.

54 {
55  if ( this->pNotify ) {
56  this->sg.ioPendingList.remove ( *this->pNotify );
57  this->sg.client.
58  whenThereIsAnExceptionDestroySyncGroupIO ( this->guard, *this->pNotify );
59  }
60 }
ca_client_context & client
Definition: syncGroup.h:190

Member Function Documentation

template<class T >
T * sgAutoPtr< T >::get ( )
inline

Definition at line 97 of file sgAutoPtr.h.

98 {
99  return this->pNotify;
100 }
template<class T >
T & sgAutoPtr< T >::operator* ( )
inline

Definition at line 82 of file sgAutoPtr.h.

83 {
84  assert ( this->pNotify );
85  return * this->pNotify;
86 }
#define assert(exp)
Declare that a condition should be true.
Definition: epicsAssert.h:70
template<class T >
T * sgAutoPtr< T >::operator-> ( )
inline

Definition at line 76 of file sgAutoPtr.h.

77 {
78  return this->pNotify;
79 }
template<class T >
sgAutoPtr< T > & sgAutoPtr< T >::operator= ( T *  pNotifyIn)
inline

Definition at line 63 of file sgAutoPtr.h.

64 {
65  if ( this->pNotify ) {
66  this->sg.ioPendingList.remove ( *this->pNotify );
67  this->sg.client.
68  whenThereIsAnExceptionDestroySyncGroupIO ( this->guard, *this->pNotify );
69  }
70  this->pNotify = pNotifyIn;
71  this->sg.ioPendingList.add ( *this->pNotify );
72  return *this;
73 }
ca_client_context & client
Definition: syncGroup.h:190
template<class T >
T * sgAutoPtr< T >::release ( )
inline

Definition at line 89 of file sgAutoPtr.h.

90 {
91  T * pTmp = this->pNotify;
92  this->pNotify = 0;
93  return pTmp;
94 }

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