Navigation
API > API/Runtime > API/Runtime/Core
This is essentially a reference version of TUniquePtr Useful to force heap allocation of a value, e.g. in a TMap to give similar behaviour to TIndirectArray
| Name | TUniqueObj |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/UniqueObj.h |
| Include Path | #include "Templates/UniqueObj.h" |
Syntax
template<typename T>
class TUniqueObj
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TUniqueObj
(
const TUniqueObj& other |
Templates/UniqueObj.h | ||
TUniqueObj
(
TUniqueObj&& other |
As TUniqueObj's internal pointer can never be null, we can't move that On the other hand we can call the move constructor of "T" | Templates/UniqueObj.h | |
TUniqueObj
(
Args&&... args |
Templates/UniqueObj.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | T | Templates/UniqueObj.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Obj | TUniquePtr< T > | Templates/UniqueObj.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T & Get () |
Templates/UniqueObj.h | ||
const T & Get () |
Templates/UniqueObj.h | ||
void Serialize
(
FArchive& Ar |
Templates/UniqueObj.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T & operator* () |
Templates/UniqueObj.h | ||
const T & operator* () |
Templates/UniqueObj.h | ||
TUniqueObj & operator=
(
const TUniqueObj& |
Disallow copy-assignment. | Templates/UniqueObj.h | |
TUniqueObj & operator=
(
TUniqueObj&& other |
Move-assignment is implemented as swapping the internal pointer. | Templates/UniqueObj.h | |
TUniqueObj & operator=
(
Arg&& other |
Templates/UniqueObj.h | ||
T * operator-> () |
Templates/UniqueObj.h | ||
const T * operator-> () |
Templates/UniqueObj.h |