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 | |
|---|---|---|---|
| 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 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 | |
|---|---|---|---|
| Returns the internal pointer | |||
| ObjectType & | operator* () |
Dereference operator returns a reference to the object this pointer points to | |
| TNonNullPtr & | Assignment operator taking a nullptr - not allowed. | ||
| TNonNullPtr & | operator=
(
ObjectType* InObject |
Assignment operator taking a pointer | |
| TNonNullPtr & | operator=
(
const TNonNullPtr< OtherObjectType >& Other |
Assignment operator taking another TNonNullPtr | |
| ObjectType * | operator-> () |
Arrow operator returns a pointer to this pointer's object |