Navigation
API > API/Runtime > API/Runtime/Core
Smart COM object pointer.
| Name | TComPtr |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Microsoft/COMPointer.h |
| Include Path | #include "Microsoft/COMPointer.h" |
Syntax
template<typename T>
class TComPtr
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Copy constructor. | Microsoft/COMPointer.h | ||
TComPtr () |
Default constructor (initialized to null). | Microsoft/COMPointer.h | |
TComPtr
(
PointerType*const Object |
Create and initialize a new instance. | Microsoft/COMPointer.h | |
| Move constructor. | Microsoft/COMPointer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TComPtr() |
Destructor. | Microsoft/COMPointer.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| PointerType | T | Microsoft/COMPointer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| RawPointer | PointerType * | Pointer to the actual object, if any. | Microsoft/COMPointer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Attach
(
PointerType* Object |
Set the pointer without adding a reference. | Microsoft/COMPointer.h | |
void Detach () |
Reset the pointer without releasing a reference. | Microsoft/COMPointer.h | |
HRESULT FromQueryInterface
(
REFIID Riid, |
Initialize this pointer from a COM interface to be queried. | Microsoft/COMPointer.h | |
PointerType * Get () |
Get raw pointer to the object pointed to. | Microsoft/COMPointer.h | |
const bool IsValid () |
Whether this pointer is pointing to an actual object. | Microsoft/COMPointer.h | |
void Reset() |
Reset this pointer to null. | Microsoft/COMPointer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator PointerType *() |
Microsoft/COMPointer.h | ||
bool operator!=
(
PointerType*const Object |
Microsoft/COMPointer.h | ||
PointerType ** operator&() |
Microsoft/COMPointer.h | ||
| Move assignment operator. | Microsoft/COMPointer.h | ||
| Copy assignment operator. | Microsoft/COMPointer.h | ||
| Assignment operator. | Microsoft/COMPointer.h | ||
bool operator==
(
PointerType*const Object |
Microsoft/COMPointer.h | ||
PointerType * operator->() |
Microsoft/COMPointer.h |