Public Member Functions | Private Attributes | List of all members
TemplateAutoRef< T > Class Template Reference

#include <template.h>

Public Member Functions

 TemplateAutoRef (T *obj)
 
 ~TemplateAutoRef ()
 
T & operator* () const
 
T * operator-> () const
 
T * get () const
 

Private Attributes

T * m_obj
 

Detailed Description

template<class T>
class TemplateAutoRef< T >

Definition at line 305 of file template.h.

Constructor & Destructor Documentation

template<class T>
TemplateAutoRef< T >::TemplateAutoRef ( T *  obj)
inline

Definition at line 308 of file template.h.

308  : m_obj(obj)
309  {
310  m_obj->addRef();
311  }
template<class T>
TemplateAutoRef< T >::~TemplateAutoRef ( )
inline

Definition at line 312 of file template.h.

313  {
314  m_obj->release();
315  }

Member Function Documentation

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

Definition at line 318 of file template.h.

318 { return m_obj; }
template<class T>
T& TemplateAutoRef< T >::operator* ( ) const
inline

Definition at line 316 of file template.h.

316 { return *m_obj; }
template<class T>
T* TemplateAutoRef< T >::operator-> ( ) const
inline

Definition at line 317 of file template.h.

317 { return m_obj; }

Member Data Documentation

template<class T>
T* TemplateAutoRef< T >::m_obj
private

Definition at line 321 of file template.h.


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