ReactOS 0.4.15-dev-6669-g8227c5d
ATL::CComPtr< T > Class Template Reference

#include <atlcomcli.h>

Inheritance 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* ()
 
_NoAddRefReleaseOnCComPtr< T > * operator-> () const
 

Public Attributes

Tp
 

Detailed Description

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

Definition at line 71 of file atlcomcli.h.

Constructor & Destructor Documentation

◆ CComPtr() [1/3]

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

Definition at line 76 of file atlcomcli.h.

77 {
78 p = NULL;
79 }
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902

◆ CComPtr() [2/3]

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

Definition at line 81 of file atlcomcli.h.

82 {
83 p = lp;
84 if (p != NULL)
85 p->AddRef();
86 }

◆ CComPtr() [3/3]

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

Definition at line 88 of file atlcomcli.h.

89 {
90 p = lp.p;
91 if (p != NULL)
92 p->AddRef();
93 }

◆ ~CComPtr()

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

Definition at line 95 of file atlcomcli.h.

96 {
97 if (p != NULL)
98 p->Release();
99 }

Member Function Documentation

◆ Attach()

◆ Detach()

◆ operator T*()

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

Definition at line 178 of file atlcomcli.h.

179 {
180 return p;
181 }

◆ operator&()

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

Definition at line 172 of file atlcomcli.h.

173 {
174 ATLASSERT(p == NULL);
175 return &p;
176 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10

◆ operator->()

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

Definition at line 183 of file atlcomcli.h.

◆ operator=() [1/2]

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

Definition at line 115 of file atlcomcli.h.

116 {
117 T* pOld = p;
118
119 p = lp.p;
120 if (p != NULL)
121 p->AddRef();
122
123 if (pOld != NULL)
124 pOld->Release();
125
126 return *this;
127 }

◆ operator=() [2/2]

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

Definition at line 101 of file atlcomcli.h.

102 {
103 T* pOld = p;
104
105 p = lp;
106 if (p != NULL)
107 p->AddRef();
108
109 if (pOld != NULL)
110 pOld->Release();
111
112 return *this;
113 }

◆ Release()

Member Data Documentation

◆ p


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