ReactOS  0.4.12-dev-57-g7050ac4
ATL::CComPtr< T > Class Template Reference

#include <atlcomcli.h>

Inheritance diagram for ATL::CComPtr< T >:
Collaboration diagram for ATL::CComPtr< T >:

Public Member Functions

 CComPtr ()
 
 CComPtr (T *lp)
 
 CComPtr (const CComPtr< T > &lp)
 
 ~CComPtr ()
 
Toperator= (T *lp)
 
Toperator= (const CComPtr< T > &lp)
 
void Release ()
 
void Attach (T *lp)
 
TDetach ()
 
T ** operator& ()
 
 operator T* ()
 
Toperator-> ()
 

Public Attributes

Tp
 

Detailed Description

template<class T>
class ATL::CComPtr< T >

Definition at line 58 of file atlcomcli.h.

Constructor & Destructor Documentation

◆ CComPtr() [1/3]

template<class T>
ATL::CComPtr< T >::CComPtr ( )
inline

Definition at line 63 of file atlcomcli.h.

64  {
65  p = NULL;
66  }
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ CComPtr() [2/3]

template<class T>
ATL::CComPtr< T >::CComPtr ( T lp)
inline

Definition at line 68 of file atlcomcli.h.

69  {
70  p = lp;
71  if (p != NULL)
72  p->AddRef();
73  }
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ CComPtr() [3/3]

template<class T>
ATL::CComPtr< T >::CComPtr ( const CComPtr< T > &  lp)
inline

Definition at line 75 of file atlcomcli.h.

76  {
77  p = lp.p;
78  if (p != NULL)
79  p->AddRef();
80  }
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ ~CComPtr()

template<class T>
ATL::CComPtr< T >::~CComPtr ( )
inline

Definition at line 82 of file atlcomcli.h.

83  {
84  if (p != NULL)
85  p->Release();
86  }
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

Member Function Documentation

◆ Attach()

template<class T>
void ATL::CComPtr< T >::Attach ( T lp)
inline

Definition at line 143 of file atlcomcli.h.

144  {
145  if (p != NULL)
146  p->Release();
147  p = lp;
148  }
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ Detach()

◆ operator T*()

template<class T>
ATL::CComPtr< T >::operator T* ( )
inline

Definition at line 165 of file atlcomcli.h.

166  {
167  return p;
168  }

◆ operator&()

template<class T>
T** ATL::CComPtr< T >::operator & ( )
inline

Definition at line 159 of file atlcomcli.h.

160  {
161  ATLASSERT(p == NULL);
162  return &p;
163  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ operator->()

template<class T>
T* ATL::CComPtr< T >::operator-> ( )
inline

Definition at line 170 of file atlcomcli.h.

171  {
172  ATLASSERT(p != NULL);
173  return p;
174  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ operator=() [1/2]

template<class T>
T* ATL::CComPtr< T >::operator= ( T lp)
inline

Definition at line 88 of file atlcomcli.h.

Referenced by ATL::CComPtr< IShellFolder2 >::operator=().

89  {
90  T* pOld = p;
91 
92  p = lp;
93  if (p != NULL)
94  p->AddRef();
95 
96  if (pOld != NULL)
97  pOld->Release();
98 
99  return *this;
100  }
#define T
Definition: mbstring.h:31
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ operator=() [2/2]

template<class T>
T* ATL::CComPtr< T >::operator= ( const CComPtr< T > &  lp)
inline

Definition at line 102 of file atlcomcli.h.

103  {
104  T* pOld = p;
105 
106  p = lp.p;
107  if (p != NULL)
108  p->AddRef();
109 
110  if (pOld != NULL)
111  pOld->Release();
112 
113  return *this;
114  }
#define T
Definition: mbstring.h:31
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ Release()

Member Data Documentation

◆ p


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