AUTOREFCOUNT< _TT > Class Template Reference

Template to manage reference-counted class. More...

#include <mi32/autorefcount.h>

Inheritance diagram for AUTOREFCOUNT< _TT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 AUTOREFCOUNT (const AUTOREFCOUNT< _TT > &rhs)
 AUTOREFCOUNT ()
 ~AUTOREFCOUNT ()
void GetExclusive ()
_TT & operator* ()
const _TT & operator* () const
_TT * operator-> ()
const _TT * operator-> () const
AUTOREFCOUNToperator= (const AUTOREFCOUNT< _TT > &rhs)

Detailed Description

template<typename _TT>
class AUTOREFCOUNT< _TT >

Template to manage reference-counted class.

Templated class must have AddRef() and Release() methods. If GetExclusive is used then must support copy constructor and have GetRefCount() method.


Constructor & Destructor Documentation

template<typename _TT>
AUTOREFCOUNT< _TT >::AUTOREFCOUNT (  )  [inline]

Default constructor.

template<typename _TT>
AUTOREFCOUNT< _TT >::AUTOREFCOUNT ( const AUTOREFCOUNT< _TT > &  rhs  )  [inline]

Copy constructor.

template<typename _TT>
AUTOREFCOUNT< _TT >::~AUTOREFCOUNT (  )  [inline]

Destructor.


Member Function Documentation

template<typename _TT>
void AUTOREFCOUNT< _TT >::GetExclusive (  )  [inline]

Get exclusive instance if multiple references exist.

Will call use copy constructor if current reference count is > 1.

template<typename _TT>
_TT& AUTOREFCOUNT< _TT >::operator* (  )  [inline]

Return reference to templated instance.

template<typename _TT>
const _TT& AUTOREFCOUNT< _TT >::operator* (  )  const [inline]

Return constant reference to templated instance.

template<typename _TT>
_TT* AUTOREFCOUNT< _TT >::operator-> (  )  [inline]

Return pointer to templated instance.

template<typename _TT>
const _TT* AUTOREFCOUNT< _TT >::operator-> (  )  const [inline]

Return constant pointer to templated instance.

template<typename _TT>
AUTOREFCOUNT& AUTOREFCOUNT< _TT >::operator= ( const AUTOREFCOUNT< _TT > &  rhs  )  [inline]

Assignment.


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

Generated on Sun Oct 7 21:33:13 2012 for TNTsdk 2012 by  doxygen 1.6.1