11#if !ULANG_BUILD_SHIPPING && ULANG_DO_CHECK
12#define ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION 1
14#define ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION 0
17#if defined(_WIN32) && !defined(_WIN64)
19 #define ULANG_FUNCTION_USES_INLINE_STORAGE 0
21 #define ULANG_FUNCTION_USES_INLINE_STORAGE 1
22 #define ULANG_FUNCTION_INLINE_SIZE 24
23 #define ULANG_FUNCTION_INLINE_ALIGNMENT 8
29template <
typename FuncType>
class TFunction;
37template <
typename FuncType>
45template <
typename FuncType>
53template <
typename FuncType>
91 template <
typename T,
bool bOnHeap>
92 struct TFunction_OwnedObject;
94 template <
bool bUnique>
95 struct TFunctionStorage;
126 template <
typename T>
149 template <
typename T>
167 template <
typename T,
bool bOnHeap>
169#if ULANG_FUNCTION_USES_INLINE_STORAGE
170 TChooseClass<bOnHeap, IFunction_OwnedObject_OnHeap<T>, IFunction_OwnedObject_Inline<T>>::Result
192 template <
typename T,
bool bOnHeap>
217 template <
typename T,
bool bOnHeap>
236 template <
typename T>
246 template <
typename T>
254 template <
typename T>
261 template <
typename FunctorType,
bool bUnique,
bool bOnHeap>
264 template <
typename FunctorType,
bool bOnHeap>
270 template <
typename FunctorType,
bool bOnHeap>
276 template <
typename FunctorType,
bool bUnique,
bool bOnHeap>
289 Other.HeapAllocation =
nullptr;
290 #if ULANG_FUNCTION_USES_INLINE_STORAGE
301 void*
NewObj =
Other.GetBoundObject()->CloneToEmptyStorage(
this);
308 #if ULANG_FUNCTION_USES_INLINE_STORAGE
323 #if ULANG_FUNCTION_USES_INLINE_STORAGE
346 #if ULANG_FUNCTION_USES_INLINE_STORAGE
352 template <
bool bUnique>
362 template <
typename FunctorType>
370#if ULANG_FUNCTION_USES_INLINE_STORAGE
379#if ULANG_FUNCTION_USES_INLINE_STORAGE
397 template <
typename T,
bool bOnHeap>
403 #if ULANG_FUNCTION_USES_INLINE_STORAGE
421 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
430 inline IDebugHelper::~IDebugHelper()
434 template <
typename T>
444 template <
typename Functor,
typename FuncType>
447 template <
typename Functor,
typename Ret,
typename... ParamTypes>
450 static Ret
Call(
void* Obj, ParamTypes&... Params)
456 template <
typename Functor,
typename... ParamTypes>
459 static void Call(
void* Obj, ParamTypes&... Params)
468 template <
typename StorageType,
typename FuncType>
471 template <
typename StorageType,
typename Ret,
typename... ParamTypes>
474 template <
typename OtherStorageType,
typename OtherFuncType>
483 : Callable(
Other.Callable)
488 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
497 Other.Callable =
nullptr;
501 template <
typename OtherStorage>
503 : Callable(
Other.Callable)
508 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
517 Other.Callable =
nullptr;
521 template <
typename OtherStorage>
523 : Callable(
Other.Callable)
530 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
542 : Callable(
Other.Callable)
549 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
561 typename FunctorType,
576 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
593 ULANG_ASSERTF(Callable,
"Attempting to call an unbound TFunction!");
599 return Callable(Storage.GetPtr(), Params...);
618 Ret (*Callable)(
void*, ParamTypes&...) =
nullptr;
622 #if ULANG_ENABLE_TFUNCTIONREF_VISUALIZATION
628 template <
typename FunctorType,
typename Ret,
typename... ParamTypes>
630 :
TIsConstructible<Ret, decltype(DeclVal<FunctorType>()(DeclVal<ParamTypes>()...))>
634 template <
typename MemberRet,
typename Class,
typename Ret,
typename... ParamTypes>
640 template <
typename MemberRet,
typename Class,
typename Ret,
typename... ParamTypes>
658 template <
typename FuncType,
typename FunctorType>
661 template <
typename FunctorType,
typename Ret,
typename... ParamTypes>
664 TIsInvocable<FunctorType, ParamTypes...>,
665 TFunctorReturnTypeIsCompatible<FunctorType, Ret, ParamTypes...>
670 template <
typename FunctorType,
typename... ParamTypes>
678 template <
typename FunctorType>
767template <
typename FuncType>
777 typename FunctorType,
837template <
typename FuncType>
854 typename FunctorType,
914 return Super::IsSet();
934template <
typename FuncType>
951 typename FunctorType,
1018 return Super::IsSet();
1025template <
typename FuncType>
1034template <
typename FuncType>
1043template <
typename FuncType>
1052template <
typename FuncType>
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
const bool
Definition NetworkReplayStreaming.h:178
#define ULANG_CA_ASSUME(Expr)
Definition Common.h:257
#define ULANG_IGNORE_CLASS_MEMACCESS_WARNING_START
Definition Common.h:128
#define ULANG_FORCEINLINE
Definition Common.h:188
#define ULANG_IGNORE_CLASS_MEMACCESS_WARNING_END
Definition Common.h:129
#define VERSE_SUPPRESS_UNUSED(_Variable)
Definition Common.h:298
#define ULANG_ERRORF(format,...)
Definition Common.h:289
#define ULANG_ASSERTF(expr, format,...)
Definition Common.h:290
#define ULANG_FUNCTION_INLINE_ALIGNMENT
Definition Function.h:23
#define ULANG_FUNCTION_INLINE_SIZE
Definition Function.h:22
memcpy(InputBufferBase, BinkBlocksData, BinkBlocksSize)
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
Definition FunctionFwd.h:19
Definition Conditionals.h:116
Definition Conditionals.h:95
Definition Function.h:769
TFunctionRef(FunctorType &&InFunc)
Definition Function.h:785
TFunctionRef(const TFunctionRef &)=default
TFunctionRef & operator=(const TFunctionRef &) const =delete
Definition Function.h:839
TFunction(const TFunction &Other)=default
TFunction & operator=(TFunction &&Other)
Definition Function.h:885
void Reset()
Definition Function.h:904
TFunction(NullPtrType=nullptr)
Definition Function.h:846
TFunction(TFunction &&)=default
TFunction & operator=(const TFunction &Other)
Definition Function.h:894
TFunction(FunctorType &&InFunc)
Definition Function.h:862
Definition Function.h:936
TUniqueFunction(NullPtrType=nullptr)
Definition Function.h:943
TUniqueFunction(const TUniqueFunction &Other)=delete
void Reset()
Definition Function.h:1008
TUniqueFunction & operator=(const TUniqueFunction &Other)=delete
TUniqueFunction & operator=(TUniqueFunction &&Other)
Definition Function.h:994
TUniqueFunction(const TFunction< FuncType > &Other)
Definition Function.h:986
~TUniqueFunction()=default
TUniqueFunction(TFunction< FuncType > &&Other)
Definition Function.h:978
TUniqueFunction(TUniqueFunction &&)=default
TUniqueFunction(FunctorType &&InFunc)
Definition Function.h:959
Definition OverriddenPropertySet.cpp:45
typename TStorageOwnerType< FunctorType, bUnique, bOnHeap >::Type TStorageOwnerTypeT
Definition Function.h:277
ULANG_FORCEINLINE TEnableIf< TIsNullableBinding< T >::Value, bool >::Type IsBound(const T &Func)
Definition Function.h:247
Definition VVMEngineEnvironment.h:23
std::nullptr_t NullPtrType
Definition Common.h:325
SSystemParams & GetSystemParams()
Global variable for efficient access.
Definition Common.cpp:9
ULANG_FORCEINLINE bool operator!=(NullPtrType, const TFunction< FuncType > &Func)
Definition Function.h:1044
bool operator==(const SSystemParams &Lhs, const SSystemParams &Rhs)
Definition Common.cpp:21
ULANG_FORCEINLINE auto Invoke(FuncType &&Func, ArgTypes &&... Args) -> decltype(uLang::ForwardArg< FuncType >(Func)(uLang::ForwardArg< ArgTypes >(Args)...))
Definition Invoke.h:47
ULANG_FORCEINLINE T && ForwardArg(typename TRemoveReference< T >::Type &Obj)
Definition References.h:115
ULANG_FORCEINLINE TRemoveReference< T >::Type && Move(T &&Obj)
Definition References.h:86
@ false
Definition radaudio_common.h:23
Definition Function.h:677
void * GetPtr() const
Definition Function.h:697
TRemoveReference< FunctorType >::Type * Bind(FunctorType &&InFunc)
Definition Function.h:679
void Unbind() const
Definition Function.h:705
void * BindCopy(const FFunctionRefStoragePolicy &Other)
Definition Function.h:687
Definition Function.h:280
FFunctionStorage & operator=(const FFunctionStorage &Other)=delete
IFunction_OwnedObject * GetBoundObject() const
Definition Function.h:305
FFunctionStorage & operator=(FFunctionStorage &&Other)=delete
void Unbind()
Definition Function.h:339
FFunctionStorage(FFunctionStorage &&Other)
Definition Function.h:286
uint8_t InlineAllocation[ULANG_FUNCTION_INLINE_SIZE]
Definition Function.h:348
FFunctionStorage(const FFunctionStorage &Other)=delete
void * BindCopy(const FFunctionStorage &Other)
Definition Function.h:299
void * GetPtr() const
Definition Function.h:321
void * HeapAllocation
Definition Function.h:345
FFunctionStorage()
Definition Function.h:281
Definition Function.h:151
~IFunction_OwnedObject_Inline() override
Definition Function.h:160
virtual void Destroy() override
Definition Function.h:155
Definition Function.h:128
~IFunction_OwnedObject_OnHeap() override
Definition Function.h:139
virtual void Destroy() override
Definition Function.h:132
Definition Function.h:101
virtual void * GetAddress()=0
virtual void * CloneToEmptyStorage(void *Storage) const =0
virtual ~IFunction_OwnedObject()=default
Definition Function.h:659
TFunctionRefBase()
Definition Function.h:477
TFunctionRefBase(TFunctionRefBase &&Other)
Definition Function.h:482
void CheckCallable() const
Definition Function.h:591
Ret operator()(ParamTypes... Params) const
Definition Function.h:596
TFunctionRefBase(const TFunctionRefBase &Other)
Definition Function.h:541
TFunctionRefBase(FunctorType &&InFunc)
Definition Function.h:568
TFunctionRefBase & operator=(TFunctionRefBase &&)=delete
~TFunctionRefBase()
Definition Function.h:602
bool IsSet() const
Definition Function.h:611
TFunctionRefBase(TFunctionRefBase< OtherStorage, Ret(ParamTypes...)> &&Other)
Definition Function.h:502
TFunctionRefBase(const TFunctionRefBase< OtherStorage, Ret(ParamTypes...)> &Other)
Definition Function.h:522
TFunctionRefBase & operator=(const TFunctionRefBase &)=delete
Definition Function.h:469
static Ret Call(void *Obj, ParamTypes &... Params)
Definition Function.h:450
static void Call(void *Obj, ParamTypes &... Params)
Definition Function.h:459
Definition Function.h:445
Definition Function.h:354
TFunctionStorage()=default
TDecay< FunctorType >::Type * Bind(FunctorType &&InFunc)
Definition Function.h:363
TFunctionStorage(FFunctionStorage &&Other)
Definition Function.h:357
Definition Function.h:194
TFunction_CopyableOwnedObject(T &&InObj)
Definition Function.h:206
TFunction_CopyableOwnedObject(const T &InObj)
Definition Function.h:198
void * CloneToEmptyStorage(void *UntypedStorage) const override
Definition Function.h:398
Definition Function.h:174
TFunction_OwnedObject(ArgTypes &&... Args)
Definition Function.h:176
virtual void * GetAddress() override
Definition Function.h:181
T Obj
Definition Function.h:186
Definition Function.h:219
void * CloneToEmptyStorage(void *Storage) const override
Definition Function.h:228
TFunction_UniqueOwnedObject(T &&InObj)
Definition Function.h:223
Definition Function.h:631
Definition Function.h:243
Definition Function.h:262
FFree _HeapFree
Free system heap memory.
Definition Common.h:415
FMalloc _HeapMalloc
Allocate system heap memory.
Definition Common.h:413
Definition Conditionals.h:16
typename Private::TDecayNonReference< typename TRemoveReference< T >::Type >::Type Type
Definition References.h:60
Definition TypeTraits.h:237
Definition TypeTraits.h:298
@ Value
Definition Function.h:79
@ Value
Definition Function.h:59
@ Value
Definition Function.h:69
Definition Conditionals.h:75
Definition Conditionals.h:45
Definition References.h:77
T Type
Definition References.h:17