14#if !defined(_WIN32) || defined(_WIN64) || (defined(ALLOW_DELEGATE_INLINE_ALLOCATORS_ON_WIN32) && ALLOW_DELEGATE_INLINE_ALLOCATORS_ON_WIN32)
16 #if !defined(NUM_DELEGATE_INLINE_BYTES) || NUM_DELEGATE_INLINE_BYTES == 0
18 #elif NUM_DELEGATE_INLINE_BYTES < 0 || (NUM_DELEGATE_INLINE_BYTES % 16) != 0
19 #error NUM_DELEGATE_INLINE_BYTES must be a multiple of 16
30template <
typename UserPolicy>
33template <
typename UserPolicy>
38#if UE_DELEGATE_CHECK_LIFETIME
65 FName GetModuleName()
const
109#define CHECK_DELEGATE_LIFETIME(DelegateInstance) \
110 if (DelegateInstance != nullptr) \
112 static_cast<const FTrackedDelegateInstanceExtras*>(DelegateInstance)->CheckValid(); \
116#define CHECK_DELEGATE_LIFETIME(DelegateInstance)
145#if UE_DELEGATE_CHECK_LIFETIME
152#if UE_DETECT_DELEGATES_RACE_CONDITIONS
166#if UE_DELEGATE_CHECK_LIFETIME
180#if UE_DELEGATE_CHECK_LIFETIME
197template <
typename ThreadSafetyMode>
200template <
typename ThreadSafetyMode>
203template <
typename ThreadSafetyMode>
211 : WriteScope(Delegate.GetWriteAccessScope())
212 , Allocation(Delegate)
224template<
typename ThreadSafetyMode>
238 template <
class,
typename,
typename,
typename...>
241 template <
bool,
class,
ESPMode,
typename,
typename,
typename...>
244 template <
ESPMode,
typename,
typename,
typename,
typename...>
247 template <
bool,
class,
typename,
typename,
typename...>
250 template <
bool,
class,
typename,
typename,
typename...>
253 template <
typename,
typename,
typename...>
256 template <
typename,
typename,
typename,
typename...>
259 template <
typename,
typename,
typename,
typename...>
265 using typename Super::FReadAccessScope;
266 using Super::GetReadAccessScope;
267 using typename Super::FWriteAccessScope;
268 using Super::GetWriteAccessScope;
290 template<
typename OtherThreadSafetyMode>
316#if USE_DELEGATE_TRYGETBOUNDFUNCTIONNAME
445 return DelegateSize ? (
IDelegateInstance*)DelegateAllocator.GetAllocation() :
nullptr;
450 return DelegateSize ? (
const IDelegateInstance*)DelegateAllocator.GetAllocation() :
nullptr;
454 template<
typename OtherThreadSafetyMode>
459 DelegateAllocator.MoveToEmpty(
Other.DelegateAllocator);
460 DelegateSize =
Other.DelegateSize;
461 Other.DelegateSize = 0;
464 template<
typename OtherThreadSafetyMode>
473 Other.DelegateSize = 0;
486 inline void UnbindUnchecked()
490 Ptr->~IDelegateInstance();
506template <
typename ThreadSafetyMode>
512template <
typename ThreadSafetyMode>
TSizedHeapAllocator< 32 > FHeapAllocator
Definition ContainerAllocationPolicies.h:857
#define NUM_DELEGATE_INLINE_BYTES
Definition CoreDefines.h:39
#define UE_NONCOPYABLE(TypeName)
Definition CoreMiscDefines.h:457
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const void * FDelegateUserObjectConst
Definition IDelegateInstance.h:108
#define ALIAS_TEMPLATE_TYPE_LAYOUT(TemplatePrefix, T, Alias)
Definition MemoryLayout.h:762
const bool
Definition NetworkReplayStreaming.h:178
ESPMode
Definition SharedPointerFwd.h:12
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Size
Definition VulkanMemory.cpp:4034
Definition IDelegateInstance.h:14
Definition NameTypes.h:617
Definition IDelegateInstance.h:112
Definition DelegateAccessHandler.h:30
Definition DelegateBase.h:226
FDelegateHandle GetHandle() const
Definition DelegateBase.h:428
friend class TBaseFunctorDelegateInstance
Definition DelegateBase.h:257
bool IsBound() const
Definition DelegateBase.h:354
TDelegateBase & operator=(TDelegateBase &&Other)
Definition DelegateBase.h:283
friend class TBaseSPMethodDelegateInstance
Definition DelegateBase.h:242
friend class TBaseUFunctionDelegateInstance
Definition DelegateBase.h:239
bool IsCompactable() const
Definition DelegateBase.h:415
friend class TBaseUObjectMethodDelegateInstance
Definition DelegateBase.h:251
UE_FORCEINLINE_HINT const IDelegateInstance * GetDelegateInstanceProtected() const
Definition DelegateBase.h:448
friend class TBaseStaticDelegateInstance
Definition DelegateBase.h:254
void Unbind()
Definition DelegateBase.h:299
~TDelegateBase()
Definition DelegateBase.h:273
friend class TBaseSPLambdaDelegateInstance
Definition DelegateBase.h:245
UE_FORCEINLINE_HINT IDelegateInstance * GetDelegateInstanceProtected()
Definition DelegateBase.h:443
bool IsBoundToObject(FDelegateUserObjectConst InUserObject) const
Definition DelegateBase.h:396
TDelegateBase(TDelegateBase< OtherThreadSafetyMode > &&Other)
Definition DelegateBase.h:291
uint64 GetBoundProgramCounterForTimerManager() const
Definition DelegateBase.h:383
class UObject * GetUObject() const
Definition DelegateBase.h:341
friend class FWriteLockedDelegateAllocation
Definition DelegateBase.h:262
TDelegateBase(TDelegateBase &&Other)
Definition DelegateBase.h:278
friend class TWeakBaseFunctorDelegateInstance
Definition DelegateBase.h:260
const void * GetObjectForTimerManager() const
Definition DelegateBase.h:367
friend class TBaseRawMethodDelegateInstance
Definition DelegateBase.h:248
SIZE_T GetAllocatedSize() const
Definition DelegateBase.h:309
Definition MulticastDelegateBase.h:28
Definition ContainerAllocationPolicies.h:814
Definition ContainerAllocationPolicies.h:618
Definition ContainerAllocationPolicies.h:894
const FName ModuleName("AssetRegistry")
implementation
Definition PlayInEditorLoadingScope.h:8
FORCEINLINE_DEBUGGABLE void CheckValid(FSchemaView Schema)
Definition GarbageCollection.cpp:1939
Definition DelegateBase.h:121
FNotThreadSafeNotCheckedDelegateMode FThreadSafetyMode
Definition DelegateBase.h:155
Definition DelegateBase.h:163
FThreadSafeDelegateMode FThreadSafetyMode
Definition DelegateBase.h:172
Definition DelegateBase.h:192
FDelegateAllocatorType::ForElementType< FAlignedInlineDelegateType > DelegateAllocator
Definition DelegateBase.h:193
int32 DelegateSize
Definition DelegateBase.h:194
Definition DelegateBase.h:179
FNotThreadSafeNotCheckedDelegateMode FThreadSafetyMode
Definition DelegateBase.h:186
Definition TypeCompatibleBytes.h:17
Definition DelegateBase.h:205
TWriteLockedDelegateAllocation(TDelegateBase< ThreadSafetyMode > &Delegate)
Definition DelegateBase.h:210