ReactOS  0.4.14-dev-50-g13bb5e2
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 64 of file atlcomcli.h.

Constructor & Destructor Documentation

◆ CComPtr() [1/3]

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

Definition at line 69 of file atlcomcli.h.

70  {
71  p = NULL;
72  }
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 74 of file atlcomcli.h.

75  {
76  p = lp;
77  if (p != NULL)
78  p->AddRef();
79  }
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 81 of file atlcomcli.h.

82  {
83  p = lp.p;
84  if (p != NULL)
85  p->AddRef();
86  }
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 88 of file atlcomcli.h.

89  {
90  if (p != NULL)
91  p->Release();
92  }
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 149 of file atlcomcli.h.

150  {
151  if (p != NULL)
152  p->Release();
153  p = lp;
154  }
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by CInternetToolbar::InitNew().

◆ Detach()

◆ operator &()

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

Definition at line 165 of file atlcomcli.h.

166  {
167  ATLASSERT(p == NULL);
168  return &p;
169  }
#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 176 of file atlcomcli.h.

177  {
178  ATLASSERT(p != NULL);
179  return p;
180  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
smooth NULL
Definition: ftsmooth.c:416
GLfloat GLfloat p
Definition: glext.h:8902

◆ operator T *()

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

Definition at line 171 of file atlcomcli.h.

172  {
173  return p;
174  }

◆ operator=() [1/2]

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

Definition at line 94 of file atlcomcli.h.

95  {
96  T* pOld = p;
97 
98  p = lp;
99  if (p != NULL)
100  p->AddRef();
101 
102  if (pOld != NULL)
103  pOld->Release();
104 
105  return *this;
106  }
#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 108 of file atlcomcli.h.

109  {
110  T* pOld = p;
111 
112  p = lp.p;
113  if (p != NULL)
114  p->AddRef();
115 
116  if (pOld != NULL)
117  pOld->Release();
118 
119  return *this;
120  }
#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: