UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TMulticastDelegateBase< UserPolicy > Class Template Reference

#include <MulticastDelegateBase.h>

+ Inheritance diagram for TMulticastDelegateBase< UserPolicy >:

Public Member Functions

 TMulticastDelegateBase (TMulticastDelegateBase &&Other)
 
TMulticastDelegateBaseoperator= (TMulticastDelegateBase &&Other)
 
void Clear ()
 
bool IsBound () const
 
bool IsBoundToObject (FDelegateUserObjectConst InUserObject) const
 
int32 RemoveAll (FDelegateUserObjectConst InUserObject)
 
SIZE_T GetAllocatedSize () const
 

Protected Types

using Super = TDelegateAccessHandlerBase< typename UserPolicy::FThreadSafetyMode >
 
using UnicastDelegateType = TDelegateBase< FNotThreadSafeNotCheckedDelegateMode >
 
using InvocationListType = TArray< UnicastDelegateType, FMulticastInvocationListAllocatorType >
 

Protected Member Functions

 TMulticastDelegateBase ()
 
template<typename DelegateInstanceInterfaceType >
void CopyFrom (const TMulticastDelegateBase &Other)
 
template<typename DelegateInstanceInterfaceType , typename... ParamTypes>
void Broadcast (ParamTypes... Params) const
 
template<typename NewDelegateType >
FDelegateHandle AddDelegateInstance (NewDelegateType &&NewDelegateBaseRef)
 
bool RemoveDelegateInstance (FDelegateHandle Handle)
 

Detailed Description

template<typename UserPolicy>
class TMulticastDelegateBase< UserPolicy >

Abstract base class for multicast delegates.

Member Typedef Documentation

◆ InvocationListType

template<typename UserPolicy >
using TMulticastDelegateBase< UserPolicy >::InvocationListType = TArray<UnicastDelegateType, FMulticastInvocationListAllocatorType>
protected

◆ Super

template<typename UserPolicy >
using TMulticastDelegateBase< UserPolicy >::Super = TDelegateAccessHandlerBase<typename UserPolicy::FThreadSafetyMode>
protected

◆ UnicastDelegateType

template<typename UserPolicy >
using TMulticastDelegateBase< UserPolicy >::UnicastDelegateType = TDelegateBase<FNotThreadSafeNotCheckedDelegateMode>
protected

Constructor & Destructor Documentation

◆ TMulticastDelegateBase() [1/2]

template<typename UserPolicy >
TMulticastDelegateBase< UserPolicy >::TMulticastDelegateBase ( TMulticastDelegateBase< UserPolicy > &&  Other)
inline

◆ TMulticastDelegateBase() [2/2]

template<typename UserPolicy >
TMulticastDelegateBase< UserPolicy >::TMulticastDelegateBase ( )
inlineprotected

Hidden default constructor.

Member Function Documentation

◆ AddDelegateInstance()

template<typename UserPolicy >
FDelegateHandle TMulticastDelegateBase< UserPolicy >::AddDelegateInstance ( NewDelegateType &&  NewDelegateBaseRef)
inlineprotected

Adds the given delegate instance to the invocation list.

Parameters
NewDelegateBaseRefThe delegate instance to add.

◆ Broadcast()

template<typename UserPolicy >
template<typename DelegateInstanceInterfaceType , typename... ParamTypes>
void TMulticastDelegateBase< UserPolicy >::Broadcast ( ParamTypes...  Params) const
inlineprotected

◆ Clear()

template<typename UserPolicy >
void TMulticastDelegateBase< UserPolicy >::Clear ( )
inline

Removes all functions from this delegate's invocation list.

◆ CopyFrom()

template<typename UserPolicy >
template<typename DelegateInstanceInterfaceType >
void TMulticastDelegateBase< UserPolicy >::CopyFrom ( const TMulticastDelegateBase< UserPolicy > &  Other)
inlineprotected

◆ GetAllocatedSize()

template<typename UserPolicy >
SIZE_T TMulticastDelegateBase< UserPolicy >::GetAllocatedSize ( ) const
inline

Returns the amount of memory allocated by this delegate's invocation list and the delegates stored within it, not including sizeof(*this).

◆ IsBound()

template<typename UserPolicy >
bool TMulticastDelegateBase< UserPolicy >::IsBound ( ) const
inline

Checks to see if any functions are bound to this multi-cast delegate.

Returns
true if any functions are bound, false otherwise.

◆ IsBoundToObject()

template<typename UserPolicy >
bool TMulticastDelegateBase< UserPolicy >::IsBoundToObject ( FDelegateUserObjectConst  InUserObject) const
inline

Checks to see if any functions are bound to the given user object.

Returns
True if any functions are bound to InUserObject, false otherwise.

◆ operator=()

template<typename UserPolicy >
TMulticastDelegateBase & TMulticastDelegateBase< UserPolicy >::operator= ( TMulticastDelegateBase< UserPolicy > &&  Other)
inline

◆ RemoveAll()

template<typename UserPolicy >
int32 TMulticastDelegateBase< UserPolicy >::RemoveAll ( FDelegateUserObjectConst  InUserObject)
inline

Removes all functions from this multi-cast delegate's invocation list that are bound to the specified UserObject. Note that the order of the delegates may not be preserved!

Parameters
InUserObjectThe object to remove all delegates for.
Returns
The number of delegates successfully removed.

◆ RemoveDelegateInstance()

template<typename UserPolicy >
bool TMulticastDelegateBase< UserPolicy >::RemoveDelegateInstance ( FDelegateHandle  Handle)
inlineprotected

Removes a function from this multi-cast delegate's invocation list (performance is O(N)).

Parameters
HandleThe handle of the delegate instance to remove.
Returns
true if the delegate was successfully removed.

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