UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes > Class Template Reference
+ Inheritance diagram for TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >:

Public Types

typedef TBaseDynamicDelegate< ThreadSafetyMode, RetValType, ParamTypes... > FDelegate
 
- Public Types inherited from TMulticastScriptDelegate< ThreadSafetyMode >
using ThreadSafetyMode = typename UE::Core::Private::TScriptDelegateTraits< ThreadSafetyMode >::ThreadSafetyMode
 
using InvocationListType = TArray< UnicastDelegateType >
 

Public Member Functions

 TBaseDynamicMulticastDelegate ()
 
 TBaseDynamicMulticastDelegate (const TMulticastScriptDelegate< ThreadSafetyMode > &InMulticastScriptDelegate)
 
template<class UserClass >
bool __Internal_IsAlreadyBound (UserClass *InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName) const
 
template<class UserClass >
bool __Internal_IsAlreadyBound (TObjectPtr< UserClass > InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName) const
 
template<class UserClass >
void __Internal_AddDynamic (UserClass *InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName)
 
template<class UserClass >
void __Internal_AddDynamic (TObjectPtr< UserClass > InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName)
 
template<class UserClass >
void __Internal_AddUniqueDynamic (UserClass *InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName)
 
template<class UserClass >
void __Internal_AddUniqueDynamic (TObjectPtr< UserClass > InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName)
 
template<class UserClass >
void __Internal_RemoveDynamic (UserClass *InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName)
 
template<class UserClass >
void __Internal_RemoveDynamic (TObjectPtr< UserClass > InUserObject, typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr InMethodPtr, FName InFunctionName)
 
- Public Member Functions inherited from TMulticastScriptDelegate< ThreadSafetyMode >
 TMulticastScriptDelegate ()=default
 
 TMulticastScriptDelegate (const TMulticastScriptDelegate &Other)
 
 TMulticastScriptDelegate (TMulticastScriptDelegate &&Other)
 
TMulticastScriptDelegateoperator= (const TMulticastScriptDelegate &Other)
 
TMulticastScriptDelegateoperator= (TMulticastScriptDelegate &&Other)
 
bool IsBound () const
 
bool Contains (const TScriptDelegate< ThreadSafetyMode > &InDelegate) const
 
bool Contains (const TScriptDelegate< OtherThreadSafetyMode > &InDelegate) const
 
bool Contains (const UObject *InObject, FName InFunctionName) const
 
void Add (const TScriptDelegate< ThreadSafetyMode > &InDelegate)
 
void Add (const TScriptDelegate< OtherThreadSafetyMode > &InDelegate)
 
void AddUnique (const TScriptDelegate< ThreadSafetyMode > &InDelegate)
 
void AddUnique (const TScriptDelegate< OtherThreadSafetyMode > &InDelegate)
 
void Remove (const TScriptDelegate< ThreadSafetyMode > &InDelegate)
 
void Remove (const TScriptDelegate< OtherThreadSafetyMode > &InDelegate)
 
void Remove (const UObject *InObject, FName InFunctionName)
 
void RemoveAll (const UObject *Object)
 
void Clear ()
 
FString ToString () const
 
void ProcessMulticastDelegate (void *Parameters) const
 
TArray< UObject * > GetAllObjects () const
 
TArray< UObject * > GetAllObjectsEvenIfUnreachable () const
 
TArray< typename UnicastDelegateType::WeakPtrType * > GetAllObjectRefsEvenIfUnreachable () const
 
SIZE_T GetAllocatedSize () const
 

Additional Inherited Members

- Protected Member Functions inherited from TMulticastScriptDelegate< ThreadSafetyMode >
void AddInternal (UnicastDelegateType &&InDelegate)
 
void AddUniqueInternal (UnicastDelegateType &&InDelegate)
 
void RemoveInternal (const UnicastDelegateType &InDelegate) const
 
void RemoveInternal (const UObject *InObject, FName InFunctionName) const
 
void CompactInvocationList () const
 
- Protected Attributes inherited from TMulticastScriptDelegate< ThreadSafetyMode >
InvocationListType InvocationList
 

Detailed Description

template<typename ThreadSafetyMode, typename RetValType, typename... ParamTypes>
class TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >

Dynamic multi-cast delegate template class (UObject-based, serializable). You'll use the various DECLARE_DYNAMIC_MULTICAST_DELEGATE macros to create the actual delegate type, templated to the function signature the delegate is compatible with. Then, you can create an instance of that class when you want to assign functions to the delegate.

Member Typedef Documentation

◆ FDelegate

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
typedef TBaseDynamicDelegate<ThreadSafetyMode, RetValType, ParamTypes...> TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::FDelegate

The actual single-cast delegate class for this multi-cast delegate

Constructor & Destructor Documentation

◆ TBaseDynamicMulticastDelegate() [1/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::TBaseDynamicMulticastDelegate ( )
inline

Default constructor

◆ TBaseDynamicMulticastDelegate() [2/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::TBaseDynamicMulticastDelegate ( const TMulticastScriptDelegate< ThreadSafetyMode > &  InMulticastScriptDelegate)
inlineexplicit

Construction from an FMulticastScriptDelegate must be explicit. This is really only used by UObject system internals.

Parameters
InScriptDelegateThe delegate to construct from by copying

Member Function Documentation

◆ __Internal_AddDynamic() [1/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
void TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_AddDynamic ( TObjectPtr< UserClass >  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
)
inline

◆ __Internal_AddDynamic() [2/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
void TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_AddDynamic ( UserClass *  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
)
inline

Binds a UObject instance and a UObject method address to this multi-cast delegate.

Parameters
InUserObjectUObject instance
InMethodPtrMember function address pointer
InFunctionNameName of member function, without class name

NOTE: Do not call this function directly. Instead, call AddDynamic() which is a macro proxy function that automatically sets the function name string for the caller.

◆ __Internal_AddUniqueDynamic() [1/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
void TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_AddUniqueDynamic ( TObjectPtr< UserClass >  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
)
inline

◆ __Internal_AddUniqueDynamic() [2/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
void TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_AddUniqueDynamic ( UserClass *  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
)
inline

Binds a UObject instance and a UObject method address to this multi-cast delegate, but only if it hasn't been bound before.

Parameters
InUserObjectUObject instance
InMethodPtrMember function address pointer
InFunctionNameName of member function, without class name

NOTE: Do not call this function directly. Instead, call AddUniqueDynamic() which is a macro proxy function that automatically sets the function name string for the caller.

◆ __Internal_IsAlreadyBound() [1/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
bool TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_IsAlreadyBound ( TObjectPtr< UserClass >  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
) const
inline

◆ __Internal_IsAlreadyBound() [2/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
bool TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_IsAlreadyBound ( UserClass *  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
) const
inline

Tests if a UObject instance and a UObject method address pair are already bound to this multi-cast delegate.

Parameters
InUserObjectUObject instance
InMethodPtrMember function address pointer
InFunctionNameName of member function, without class name
Returns
True if the instance/method is already bound.

NOTE: Do not call this function directly. Instead, call IsAlreadyBound() which is a macro proxy function that automatically sets the function name string for the caller.

◆ __Internal_RemoveDynamic() [1/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
void TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_RemoveDynamic ( TObjectPtr< UserClass >  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
)
inline

◆ __Internal_RemoveDynamic() [2/2]

template<typename ThreadSafetyMode , typename RetValType , typename... ParamTypes>
template<class UserClass >
void TBaseDynamicMulticastDelegate< ThreadSafetyMode, RetValType, ParamTypes >::__Internal_RemoveDynamic ( UserClass *  InUserObject,
typename FDelegate::template TMethodPtrResolver< UserClass >::FMethodPtr  InMethodPtr,
FName  InFunctionName 
)
inline

Unbinds a UObject instance and a UObject method address from this multi-cast delegate.

Parameters
InUserObjectUObject instance
InMethodPtrMember function address pointer
InFunctionNameName of member function, without class name

NOTE: Do not call this function directly. Instead, call RemoveDynamic() which is a macro proxy function that automatically sets the function name string for the caller.


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