Navigation
Unreal Engine C++ API Reference > 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 | |
---|---|---|---|
![]() |
Hack that can be used under extraordinary circumstances | ||
![]() |
Nullptr constructor - not allowed. | ||
![]() |
TNonNullPtr
(
ObjectType* InObject |
Constructs a non-null pointer from the provided pointer. Must not be nullptr. | |
![]() |
TNonNullPtr
(
const gsl::not_null< OtherType >& Other |
Converts from gsl::not_null | |
![]() |
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 |
![]() ![]() |
bool | WARNING: Hack that can be used under extraordinary circumstances. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Use IsInitialized if needed | ||
![]() ![]() |
Converts to a gsl::not_null | ||
![]() ![]() |
Returns the internal pointer | ||
![]() ![]() |
bool | operator!=
(
const TNonNullPtr& Other |
|
![]() ![]() |
bool | operator!=
(
OtherObjectType* Other |
|
![]() ![]() |
ObjectType & | operator* () |
Dereference operator returns a reference to the object this pointer points to |
![]() |
TNonNullPtr & | operator=
(
const gsl::not_null< OtherType >& Other |
Assignment operator taking a gsl::not_null |
![]() |
TNonNullPtr & | operator=
(
const TNonNullPtr< OtherObjectType >& Other |
Assignment operator taking another TNonNullPtr |
![]() |
TNonNullPtr & | operator=
(
ObjectType* InObject |
Assignment operator taking a pointer |
![]() |
TNonNullPtr & | Assignment operator taking a nullptr - not allowed. | |
![]() ![]() |
bool | operator==
(
const TNonNullPtr& Other |
Comparison, will also handle default constructed state |
![]() ![]() |
bool | operator==
(
OtherObjectType* Other |
Comparison with a raw pointer |
![]() ![]() |
bool | ||
![]() ![]() |
ObjectType * | operator-> () |
Arrow operator returns a pointer to this pointer's object |
Typedefs
Name | Description |
---|---|
IntrusiveUnsetOptionalStateType |
Constants
Name | Description |
---|---|
bHasIntrusiveUnsetOptionalState | Start - intrusive TOptional |