Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/NonNullPointer.h |
| Include | #include "Templates/NonNullPointer.h" |
Syntax
template<typename ObjectType>
class TNonNullPtr
Remarks
TNonNullPtr is a non-nullable, non-owning, raw/naked/unsafe pointer.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TNonNullPtr
(
EDefaultConstructNonNullPtr |
Hack that can be used under extraordinary circumstances | ||
TNonNullPtr
(
TYPE_OF_NULLPTR |
Nullptr constructor - not allowed. | ||
TNonNullPtr
(
ObjectType* InObject |
Constructs a non-null pointer from the provided pointer. Must not be nullptr. | ||
TNonNullPtr
(
const TNonNullPtr< OtherObjectType >& Other |
Constructs a non-null pointer from another non-null pointer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| ObjectType * | Get () |
Returns the internal pointer |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Returns the internal pointer | |||
| ObjectType & | operator* () |
Dereference operator returns a reference to the object this pointer points to | |
| TNonNullPtr & | operator=
(
TYPE_OF_NULLPTR |
Assignment operator taking a nullptr - not allowed. | |
| TNonNullPtr & | operator=
(
ObjectType* InObject |
Assignment operator taking a pointer | |
| TEnableIf< UE::Core::Private::NonNullPtr::TPointerIsConvertibleFromTo< OtherObjectType, ObjectType >... | operator=
(
const TNonNullPtr< OtherObjectType >& Other |
Assignment operator taking another TNonNullPtr | |
| ObjectType * | operator-> () |
Arrow operator returns a pointer to this pointer's object |