ReactOS 0.4.16-dev-2621-gb0c8475
CicInterface_RefCnt< T_IFACE > Class Template Reference

#include <ciciface.h>

Public Member Functions

 CicInterface_RefCnt ()
 
 CicInterface_RefCnt (T_IFACE *ptr)
 
 ~CicInterface_RefCnt ()
 
void Attach (T_IFACE *ptr)
 
T_IFACE * Detach ()
 
 operator T_IFACE * ()
 
T_IFACE * operator-> ()
 
T_IFACE ** operator& ()
 

Protected Attributes

T_IFACE * m_ptr
 

Private Member Functions

 CicInterface_RefCnt (const CicInterface_RefCnt< T_IFACE > &)=delete
 
CicInterface_RefCnt< T_IFACE > & operator= (const CicInterface_RefCnt< T_IFACE > &)=delete
 

Detailed Description

template<typename T_IFACE>
class CicInterface_RefCnt< T_IFACE >

Definition at line 13 of file ciciface.h.

Constructor & Destructor Documentation

◆ CicInterface_RefCnt() [1/3]

template<typename T_IFACE >
CicInterface_RefCnt< T_IFACE >::CicInterface_RefCnt ( )
inline

Definition at line 19 of file ciciface.h.

19: m_ptr(NULL) { }
T_IFACE * m_ptr
Definition: ciciface.h:16
#define NULL
Definition: types.h:112

◆ CicInterface_RefCnt() [2/3]

template<typename T_IFACE >
CicInterface_RefCnt< T_IFACE >::CicInterface_RefCnt ( T_IFACE *  ptr)
inline

Definition at line 21 of file ciciface.h.

21 : m_ptr(ptr)
22 {
23 if (m_ptr)
24 m_ptr->AddRef();
25 }
static PVOID ptr
Definition: dispmode.c:27

◆ ~CicInterface_RefCnt()

template<typename T_IFACE >
CicInterface_RefCnt< T_IFACE >::~CicInterface_RefCnt ( )
inline

Definition at line 27 of file ciciface.h.

28 {
29 if (m_ptr)
30 m_ptr->Release();
31 }

◆ CicInterface_RefCnt() [3/3]

template<typename T_IFACE >
CicInterface_RefCnt< T_IFACE >::CicInterface_RefCnt ( const CicInterface_RefCnt< T_IFACE > &  )
privatedelete

Member Function Documentation

◆ Attach()

template<typename T_IFACE >
void CicInterface_RefCnt< T_IFACE >::Attach ( T_IFACE *  ptr)
inline

Definition at line 33 of file ciciface.h.

34 {
35 if (m_ptr)
36 m_ptr->Release();
37 m_ptr = ptr;
38 }

◆ Detach()

template<typename T_IFACE >
T_IFACE * CicInterface_RefCnt< T_IFACE >::Detach ( )
inline

Definition at line 40 of file ciciface.h.

41 {
42 T_IFACE* old_ptr = m_ptr;
43 m_ptr = NULL;
44 return old_ptr;
45 }

◆ operator T_IFACE *()

template<typename T_IFACE >
CicInterface_RefCnt< T_IFACE >::operator T_IFACE * ( )
inline

Definition at line 47 of file ciciface.h.

47{ return m_ptr; }

◆ operator&()

template<typename T_IFACE >
T_IFACE ** CicInterface_RefCnt< T_IFACE >::operator& ( )
inline

Definition at line 50 of file ciciface.h.

51 {
53 return &m_ptr;
54 }
#define cicAssert
Definition: cicbase.h:11

◆ operator->()

template<typename T_IFACE >
T_IFACE * CicInterface_RefCnt< T_IFACE >::operator-> ( )
inline

Definition at line 48 of file ciciface.h.

48{ return m_ptr; }

◆ operator=()

template<typename T_IFACE >
CicInterface_RefCnt< T_IFACE > & CicInterface_RefCnt< T_IFACE >::operator= ( const CicInterface_RefCnt< T_IFACE > &  )
privatedelete

Member Data Documentation

◆ m_ptr


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