![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cIUnkPtr.h>
Public Member Functions | |
cIUnkPtr () | |
Construct and destruction. More... | |
cIUnkPtr (const TYPE *p2) | |
cIUnkPtr (const THIS_t &ref) | |
cIUnkPtr (THIS_t &&ref) | |
~cIUnkPtr () | |
int | get_RefCount () const |
TYPE ** | get_PPtr () |
void ** | get_PPtrV () |
TYPE * | GetInterfacePtr () const |
void | put_Ptr (TYPE *p2) |
HRESULT | SetQI (IUnknown *p2, const IID &riid) |
int | ReleasePtr () |
THIS_t & | operator= (const TYPE *p2) |
Assignment ops. More... | |
THIS_t & | operator= (const THIS_t &p2) |
TYPE & | operator* () const |
Accessor ops. More... | |
TYPE * | operator-> () const |
![]() | |
cPtrFacade (IUnknown *p=nullptr) noexcept | |
cPtrFacade (THIS_t &&ref) noexcept | |
bool | isValidPtr () const noexcept |
IUnknown ** | get_PPtr () |
IUnknown * | get_Ptr () const noexcept |
void | put_Ptr (IUnknown *p) noexcept |
void | ReleasePtr () noexcept |
void | AttachPtr (IUnknown *p) noexcept |
IUnknown * | DetachPtr () noexcept |
THIS_t & | operator= (IUnknown *p) noexcept |
THIS_t & | operator= (THIS_t &&ref) noexcept |
operator IUnknown * () const noexcept | |
IUnknown & | get_Ref () const |
IUnknown & | operator* () const |
IUnknown * | operator-> () const |
bool | operator! () const noexcept |
Comparison ops. More... | |
bool | operator!= (IUnknown *p2) const noexcept |
bool | operator== (IUnknown *p2) const noexcept |
Protected Member Functions | |
void | SetFirstIUnk (TYPE *p2) |
Additional Inherited Members | |
![]() | |
IUnknown * | m_p |
Pointer to some object of TYPE. More... | |
Smart pointer to an IUnknown based object. like _WIN32 ATL cComPtr<> or "com_ptr_t" TYPE must be based on IUnknown
|
inline |
Construct and destruction.
|
inline |
|
inline |
using the assignment auto constructor is not working so use this.
|
inline |
move constructor. would ': cPtrFacade<TYPE>(ref)' deal with cPtrTrace correctly?
|
inline |
|
inline |
use IUNK_GETPPTR() macro to track this with USE_IUNK_TRACE. QueryInterface() or similar wants a pointer to a pointer to fill in my interface.
|
inline |
get a ** to assign the pointer. assume the caller has added the first reference for me. Don't call AddRef! use IUNK_GETPPTRV() macro to track this with USE_IUNK_TRACE. QueryInterface() and others don't like the typing.
|
inline |
|
inline |
like _com_ptr_t
|
inline |
Accessor ops.
|
inline |
|
inline |
|
inline |
Assignment ops.
|
inline |
|
inline |
Compliment SetFirstIUnk()
|
inlineprotected |
Initialize the pointer value and add a single reference. Compliment ReleasePtr()
|
inline |
Do proper COM style dynamic_cast for Interface using QueryInterface().