Lines Matching defs:ComPtr

73  *      to the ComPtr instance (either in the copy constructor or by assignment);
86 * ComPtr<IMachine> pMachine = findMachine("blah"); // calls AddRef()
87 * ComPtr<IUnknown> pUnknown = pMachine; // calls QueryInterface()
88 * } # ComPtr destructor of both instances calls Release()
93 class ComPtr
100 ComPtr()
107 ~ComPtr()
113 * Copy constructor from another ComPtr of any interface.
116 * pointer p does not support the ComPtr interface T.
122 ComPtr(const ComPtr<T2> &that)
130 * Specialization: copy constructor from another ComPtr<T>. Calls AddRef().
132 ComPtr(const ComPtr &that)
141 * pointer p does not support the ComPtr interface T.
147 ComPtr(T2 *p)
157 ComPtr(T *that_p)
163 * Assignment from another ComPtr of any interface.
166 * pointer p does not support the ComPtr interface T.
172 ComPtr& operator=(const ComPtr<T2> &that)
178 * Specialization of the previous: assignment from another ComPtr<T>.
181 ComPtr& operator=(const ComPtr &that)
190 * pointer p does not support the ComPtr interface T.
196 ComPtr& operator=(T2 *p)
208 ComPtr& operator=(T *p)
216 * Resets the ComPtr to NULL. Works like a NULL assignment except it avoids the templates.
237 * Conversion operator, most often used to pass ComPtr instances as
255 * Special method which allows using a ComPtr as an output argument of a COM method.
256 * The ComPtr will then accept the method's interface pointer without calling AddRef()
260 * The ComPtr destructor will then still invoke Release() so that the returned object
402 * ComObjPtr is a more specialized variant of ComPtr designed to be used for implementation
403 * objects. For example, use ComPtr<IMachine> for a client pointer that calls the interface
419 * ComPtr<IProgress> pProgress2; // create an interface pointer
426 class ComObjPtr : public ComPtr<T>
431 : ComPtr<T>()
435 : ComPtr<T>(that)
439 : ComPtr<T>(that_p)
444 ComPtr<T>::operator=(that);
450 ComPtr<T>::operator=(that_p);