ReactOS 0.4.15-dev-6067-g0b695a6
ATL::CComQIIDPtr< T, piid > Class Template Reference

#include <atlcomcli.h>

Inheritance diagram for ATL::CComQIIDPtr< T, piid >:
Collaboration diagram for ATL::CComQIIDPtr< T, piid >:

Public Member Functions

 CComQIIDPtr ()
 
 CComQIIDPtr (_Inout_opt_ T *lp)
 
 CComQIIDPtr (_Inout_ const CComQIIDPtr< T, piid > &lp)
 
 CComQIIDPtr (_Inout_opt_ IUnknown *lp)
 
Toperator= (T *lp)
 
Toperator= (const CComQIIDPtr< T, piid > &lp)
 
Toperator= (IUnknown *lp)
 
- Public Member Functions inherited from ATL::CComPtr< T >
 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* ()
 
_NoAddRefReleaseOnCComPtr< T > * operator-> () const
 

Additional Inherited Members

- Public Attributes inherited from ATL::CComPtr< T >
Tp
 

Detailed Description

template<class T, const IID * piid>
class ATL::CComQIIDPtr< T, piid >

Definition at line 195 of file atlcomcli.h.

Constructor & Destructor Documentation

◆ CComQIIDPtr() [1/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( )
inline

Definition at line 202 of file atlcomcli.h.

203 {
204 }

◆ CComQIIDPtr() [2/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( _Inout_opt_ T lp)
inline

Definition at line 205 of file atlcomcli.h.

205 :
206 CComPtr<T>(lp)
207 {
208 }

◆ CComQIIDPtr() [3/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( _Inout_ const CComQIIDPtr< T, piid > &  lp)
inline

Definition at line 209 of file atlcomcli.h.

209 :
210 CComPtr<T>(lp.p)
211 {
212 }

◆ CComQIIDPtr() [4/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( _Inout_opt_ IUnknown lp)
inline

Definition at line 213 of file atlcomcli.h.

214 {
215 if (lp != NULL)
216 {
217 if (FAILED(lp->QueryInterface(*piid, (void**)(IUnknown**)&p)))
218 p = NULL;
219 }
220 }
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902
#define FAILED(hr)
Definition: intsafe.h:51

Member Function Documentation

◆ operator=() [1/3]

template<class T , const IID * piid>
T * ATL::CComQIIDPtr< T, piid >::operator= ( const CComQIIDPtr< T, piid > &  lp)
inline

Definition at line 235 of file atlcomcli.h.

236 {
237 T* pOld = p;
238
239 p = lp.p;
240 if (p != NULL)
241 p->AddRef();
242
243 if (pOld != NULL)
244 pOld->Release();
245
246 return *this;
247 }
#define T
Definition: mbstring.h:31

◆ operator=() [2/3]

template<class T , const IID * piid>
T * ATL::CComQIIDPtr< T, piid >::operator= ( IUnknown lp)
inline

Definition at line 249 of file atlcomcli.h.

250 {
251 T* pOld = p;
252
253 if (!lp || FAILED(lp->QueryInterface(*piid, (void**)(IUnknown**)&p)))
254 p = NULL;
255
256 if (pOld != NULL)
257 pOld->Release();
258
259 return *this;
260 }
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ operator=() [3/3]

template<class T , const IID * piid>
T * ATL::CComQIIDPtr< T, piid >::operator= ( T lp)
inline

Definition at line 221 of file atlcomcli.h.

222 {
223 T* pOld = p;
224
225 p = lp;
226 if (p != NULL)
227 p->AddRef();
228
229 if (pOld != NULL)
230 pOld->Release();
231
232 return *this;
233 }

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