MMSHandle< X > Class Template Reference

Handler class that implements reference counting. More...

#include <mmshandle.h>

List of all members.


Public Member Functions

 MMSHandle (X *orig)
 Constructor.
 MMSHandle (const MMSHandle &orig)
 Copy constructor.
virtual ~MMSHandle () throw ()
 Destructor.
X * operator-> () throw ()
 Overloaded -> operator.
void operator= (const MMSHandle &orig) throw ()
 Overloaded = operator.
X & operator* () const throw ()
 Get data object.
X * getObject () const throw ()
 Get data object.

Private Attributes

X * data
 pointer to object that shall be handled
int * refCount
 reference counter
MMSMutexlock
 needed to make increase and decrease of refCount atomic

Detailed Description

template<class X>
class MMSHandle< X >

Handler class that implements reference counting.

Definition at line 42 of file mmshandle.h.


Constructor & Destructor Documentation

template<class X>
MMSHandle< X >::MMSHandle ( X *  orig  )  [inline, explicit]

Constructor.

Definition at line 52 of file mmshandle.h.

template<class X>
MMSHandle< X >::MMSHandle ( const MMSHandle< X > &  orig  )  [inline]

Copy constructor.

Definition at line 58 of file mmshandle.h.

template<class X>
virtual MMSHandle< X >::~MMSHandle (  )  throw () [inline, virtual]

Destructor.

Definition at line 67 of file mmshandle.h.


Member Function Documentation

template<class X>
X* MMSHandle< X >::operator-> (  )  throw () [inline]

Overloaded -> operator.

Just returns the data object.

Definition at line 82 of file mmshandle.h.

template<class X>
void MMSHandle< X >::operator= ( const MMSHandle< X > &  orig  )  throw () [inline]

Overloaded = operator.

Definition at line 89 of file mmshandle.h.

template<class X>
X& MMSHandle< X >::operator* (  )  const throw () [inline]

Get data object.

Definition at line 117 of file mmshandle.h.

template<class X>
X* MMSHandle< X >::getObject (  )  const throw () [inline]

Get data object.

Definition at line 124 of file mmshandle.h.


Member Data Documentation

template<class X>
X* MMSHandle< X >::data [private]

pointer to object that shall be handled

Definition at line 44 of file mmshandle.h.

template<class X>
int* MMSHandle< X >::refCount [private]

reference counter

Definition at line 45 of file mmshandle.h.

template<class X>
MMSMutex* MMSHandle< X >::lock [private]

needed to make increase and decrease of refCount atomic

Definition at line 46 of file mmshandle.h.


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