6#include "Misc/AssertionMacros.h"
7#include "Misc/OptionalFwd.h"
8#include "Templates/EnableIf.h"
9#include "Templates/PointerIsConvertibleFromTo.h"
19
20
21
22template <
typename,
typename,
typename =
void>
23struct TPointerIsConvertibleFromTo;
26
27
28
29
30template <
typename From,
typename To>
37
38
39
40
49
50
51template<
typename ObjectType>
57
58
65
66
70 static_assert(
sizeof(
ObjectType) == 0,
"Tried to initialize TNonNullPtr with a null pointer!");
74
75
83
84
86 typename OtherObjectType,
95
96
100 static_assert(
sizeof(
ObjectType) == 0,
"Tried to assign a null pointer to a TNonNullPtr!");
104
105
114
115
116 template <
typename OtherObjectType>
124
125
133
134
142
143
151
152
168
169
170template<
typename OptionalType>
209 OptionalType*
Emplace(OptionalType* InPointer)
236 OptionalType*
GetValue()
const {
checkf(
IsSet(), TEXT(
"It is an error to call GetValue() on an unset TOptional. Please either check IsSet() or use Get(DefaultValue) instead."));
return Pointer; }
#define ensureMsgf( InExpression, InFormat,...)
#define checkf(expr, format,...)
EDefaultConstructNonNullPtr
FORCEINLINE TNonNullPtr(const TNonNullPtr< OtherObjectType > &Other)
FORCEINLINE TNonNullPtr & operator=(ObjectType *InObject)
FORCEINLINE operator ObjectType *() const
FORCEINLINE ObjectType * operator->() const
FORCEINLINE TNonNullPtr & operator=(TYPE_OF_NULLPTR)
FORCEINLINE ObjectType * Get() const
FORCEINLINE TNonNullPtr(EDefaultConstructNonNullPtr)
FORCEINLINE TNonNullPtr(TYPE_OF_NULLPTR)
FORCEINLINE ObjectType & operator*() const
FORCEINLINE TNonNullPtr(ObjectType *InObject)
FORCEINLINE TEnableIf< UE::Core::Private::NonNullPtr::TPointerIsConvertibleFromTo< OtherObjectType, ObjectType >::Value, TNonNullPtr & >::Type operator=(const TNonNullPtr< OtherObjectType > &Other)
FORCEINLINE operator bool() const
TOptional & operator=(const TOptional &Other)
OptionalType * Emplace(OptionalType *InPointer)
OptionalType * operator->() const
bool operator==(const TOptional &rhs) const
TOptional & operator=(OptionalType *InPointer)
bool operator!=(const TOptional &rhs) const
OptionalType * GetValue() const
OptionalType & operator*() const
TOptional(const TNonNullPtr< OptionalType > &InPointer)
OptionalType * Get(OptionalType *DefaultPointer) const