Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TNonNullPtr< ObjectType > Class Template Reference

#include <NonNullPointer.h>

Public Member Functions

FORCEINLINE TNonNullPtr (EDefaultConstructNonNullPtr)
 
FORCEINLINE TNonNullPtr (TYPE_OF_NULLPTR)
 
FORCEINLINE TNonNullPtr (ObjectType *InObject)
 
template<typename OtherObjectType , typename = typename TEnableIf<UE::Core::Private::NonNullPtr::TPointerIsConvertibleFromTo<OtherObjectType, ObjectType>::Value>::Type>
FORCEINLINE TNonNullPtr (const TNonNullPtr< OtherObjectType > &Other)
 
FORCEINLINE TNonNullPtroperator= (TYPE_OF_NULLPTR)
 
FORCEINLINE TNonNullPtroperator= (ObjectType *InObject)
 
template<typename OtherObjectType >
FORCEINLINE TEnableIf< UE::Core::Private::NonNullPtr::TPointerIsConvertibleFromTo< OtherObjectType, ObjectType >::Value, TNonNullPtr & >::Type operator= (const TNonNullPtr< OtherObjectType > &Other)
 
FORCEINLINE operator ObjectType * () const
 
FORCEINLINE ObjectTypeGet () const
 
FORCEINLINE ObjectTypeoperator* () const
 
FORCEINLINE ObjectTypeoperator-> () const
 

Private Attributes

ObjectTypeObject
 

Detailed Description

template<typename ObjectType>
class TNonNullPtr< ObjectType >

TNonNullPtr is a non-nullable, non-owning, raw/naked/unsafe pointer.

Definition at line 52 of file NonNullPointer.h.

Constructor & Destructor Documentation

◆ TNonNullPtr() [1/4]

Hack that can be used under extraordinary circumstances

Definition at line 59 of file NonNullPointer.h.

◆ TNonNullPtr() [2/4]

nullptr constructor - not allowed.

Definition at line 67 of file NonNullPointer.h.

◆ TNonNullPtr() [3/4]

Constructs a non-null pointer from the provided pointer. Must not be nullptr.

Definition at line 76 of file NonNullPointer.h.

◆ TNonNullPtr() [4/4]

template<typename ObjectType >
template<typename OtherObjectType , typename = typename TEnableIf<UE::Core::Private::NonNullPtr::TPointerIsConvertibleFromTo<OtherObjectType, ObjectType>::Value>::Type>
FORCEINLINE TNonNullPtr< ObjectType >::TNonNullPtr ( const TNonNullPtr< OtherObjectType > & Other)
inline

Constructs a non-null pointer from another non-null pointer

Definition at line 89 of file NonNullPointer.h.

Member Function Documentation

◆ Get()

template<typename ObjectType >
FORCEINLINE ObjectType * TNonNullPtr< ObjectType >::Get ( ) const
inline

Returns the internal pointer

Definition at line 135 of file NonNullPointer.h.

◆ operator ObjectType *()

Returns the internal pointer

Definition at line 126 of file NonNullPointer.h.

◆ operator*()

Dereference operator returns a reference to the object this pointer points to

Definition at line 144 of file NonNullPointer.h.

◆ operator->()

Arrow operator returns a pointer to this pointer's object

Definition at line 153 of file NonNullPointer.h.

◆ operator=() [1/3]

◆ operator=() [2/3]

Assignment operator taking a pointer

Definition at line 106 of file NonNullPointer.h.

◆ operator=() [3/3]

Assignment operator taking a nullptr - not allowed.

Definition at line 97 of file NonNullPointer.h.

Member Data Documentation

◆ Object

template<typename ObjectType >
ObjectType* TNonNullPtr< ObjectType >::Object
private

The object we're holding a reference to.

Definition at line 162 of file NonNullPointer.h.


The documentation for this class was generated from the following file: