Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates
Inheritance Hierarchy
- Deleter
- TUniquePtr< T[], Deleter >
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/UniquePtr.h |
| Include | #include "Templates/UniquePtr.h" |
Syntax
template<typename T, typename Deleter>
class TUniquePtr< T , Deleter > : private Deleter
Functions
| Type | Name | Description | |
|---|---|---|---|
~TUniquePtr () |
Destructor | ||
| T * | Get () |
Returns a pointer to the owned array without relinquishing ownership. | |
| Deleter & | GetDeleter () |
Returns a reference to the deleter subobject. | |
| const Deleter & | GetDeleter () |
Returns a reference to the deleter subobject. | |
| bool | IsValid () |
Tests if the TUniquePtr currently owns an array. | |
| T * | Release () |
Relinquishes control of the owned array to the caller and nulls the TUniquePtr. | |
| void | Reset
(
U* InPtr |
Gives the TUniquePtr a new array to own, destroying any previously-owned array. | |
| void | Reset
(
TYPE_OF_NULLPTR InPtr |
||
TUniquePtr
(
U* InPtr, |
Pointer constructor - takes ownership of the pointed-to array | ||
TUniquePtr () |
Default constructor - initializes the TUniquePtr to null. | ||
TUniquePtr
(
const TUniquePtr& |
Non-copyable. | ||
TUniquePtr
(
U* InPtr |
Pointer constructor - takes ownership of the pointed-to array | ||
| Nullptr constructor - initializes the TUniquePtr to null. | |||
TUniquePtr
(
TUniquePtr&& Other |
Move constructor | ||
TUniquePtr
(
TUniquePtr< OtherT, OtherDeleter >&& Other |
Constructor from rvalues of other (usually less qualified) types | ||
TUniquePtr
(
U* InPtr, |
Pointer constructor - takes ownership of the pointed-to array |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Operator bool | |||
| bool | operator!=
(
const TUniquePtr< RhsT >& Rhs |
Inequality comparison operator | |
| bool | Inequality comparison operator against nullptr. | ||
| T & | operator[]
(
SIZE_T Index |
Indexing operator | |
| TUniquePtr & | Nullptr assignment operator | ||
| TUniquePtr & | operator=
(
TUniquePtr&& Other |
Move assignment operator | |
| TUniquePtr & | operator=
(
TUniquePtr< OtherT, OtherDeleter >&& Other |
Assignment operator for rvalues of other (usually less qualified) types | |
| TUniquePtr & | operator=
(
const TUniquePtr& |
||
| bool | operator==
(
const TUniquePtr< RhsT >& Rhs |
Equality comparison operator | |
| bool | Equality comparison operator against nullptr. |
Typedefs
| Name | Description |
|---|---|
| ElementType |