Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TTSMulticastDelegateBase< UserPolicy > Class Template Reference

#include <TSMulticastDelegateBase.h>

+ Inheritance diagram for TTSMulticastDelegateBase< UserPolicy >:
+ Collaboration diagram for TTSMulticastDelegateBase< UserPolicy >:

Public Member Functions

void Clear ()
 
bool IsBound () const
 
bool IsBoundToObject (void const *InUserObject) const
 
int32 RemoveAll (const void *InUserObject)
 

Protected Types

using Super = TMulticastDelegateBase<UserPolicy>
 
using UserPolicyType = UserPolicy
 
- Protected Types inherited from TMulticastDelegateBase< UserPolicy >
using InvocationListType = TArray<TDelegateBase<UserPolicy>, FMulticastInvocationListAllocatorType>
 

Protected Member Functions

 TTSMulticastDelegateBase ()=default
 
template<typename DelegateInstanceInterfaceType , typename DelegateType >
void CopyFrom (const TTSMulticastDelegateBase &Other)
 
template<typename DelegateInstanceInterfaceType , typename DelegateBaseType , typename... ParamTypes>
void Broadcast (ParamTypes... Params) const
 
FDelegateHandle AddDelegateInstance (TDelegateBase< UserPolicy > &&NewDelegateBaseRef)
 
bool RemoveDelegateInstance (FDelegateHandle Handle)
 
- Protected Member Functions inherited from TMulticastDelegateBase< UserPolicy >
 TMulticastDelegateBase ()
 
template<typename DelegateInstanceInterfaceType , typename DelegateType >
void CopyFrom (const TMulticastDelegateBase &Other)
 
template<typename DelegateInstanceInterfaceType , typename DelegateBaseType , typename... ParamTypes>
void Broadcast (ParamTypes... Params) const
 
FDelegateHandle AddDelegateInstance (TDelegateBase< UserPolicy > &&NewDelegateBaseRef)
 
bool RemoveDelegateInstance (FDelegateHandle Handle)
 
void Clear ()
 
bool IsBound () const
 
bool IsBoundToObject (void const *InUserObject) const
 
int32 RemoveAll (const void *InUserObject)
 
SIZE_T GetAllocatedSize () const
 

Private Attributes

FCriticalSection CS
 

Additional Inherited Members

- Static Protected Member Functions inherited from TMulticastDelegateBase< UserPolicy >
template<typename DelegateType >
static FORCEINLINE autoGetDelegateInstanceProtectedHelper (const DelegateType &Base)
 

Detailed Description

template<typename UserPolicy>
class TTSMulticastDelegateBase< UserPolicy >

Abstract base class for thread-safe multicast delegates.

Definition at line 13 of file TSMulticastDelegateBase.h.

Member Typedef Documentation

◆ Super

template<typename UserPolicy >
using TTSMulticastDelegateBase< UserPolicy >::Super = TMulticastDelegateBase<UserPolicy>
protected

Definition at line 16 of file TSMulticastDelegateBase.h.

◆ UserPolicyType

template<typename UserPolicy >
using TTSMulticastDelegateBase< UserPolicy >::UserPolicyType = UserPolicy
protected

Definition at line 17 of file TSMulticastDelegateBase.h.

Constructor & Destructor Documentation

◆ TTSMulticastDelegateBase()

template<typename UserPolicy >
TTSMulticastDelegateBase< UserPolicy >::TTSMulticastDelegateBase ( )
protecteddefault

Hidden default constructor.

Member Function Documentation

◆ AddDelegateInstance()

template<typename UserPolicy >
FDelegateHandle TTSMulticastDelegateBase< UserPolicy >::AddDelegateInstance ( TDelegateBase< UserPolicy > && NewDelegateBaseRef)
inlineprotected

Adds the given delegate instance to the invocation list.

Parameters
NewDelegateBaseRefThe delegate instance to add.

Definition at line 87 of file TSMulticastDelegateBase.h.

◆ Broadcast()

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

Definition at line 76 of file TSMulticastDelegateBase.h.

◆ Clear()

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

Removes all functions from this delegate's invocation list.

Definition at line 21 of file TSMulticastDelegateBase.h.

◆ CopyFrom()

template<typename UserPolicy >
template<typename DelegateInstanceInterfaceType , typename DelegateType >
void TTSMulticastDelegateBase< UserPolicy >::CopyFrom ( const TTSMulticastDelegateBase< UserPolicy > & Other)
inlineprotected

Definition at line 69 of file TSMulticastDelegateBase.h.

◆ IsBound()

template<typename UserPolicy >
bool TTSMulticastDelegateBase< 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.

Definition at line 32 of file TSMulticastDelegateBase.h.

◆ IsBoundToObject()

template<typename UserPolicy >
bool TTSMulticastDelegateBase< UserPolicy >::IsBoundToObject ( void const * 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.

Definition at line 43 of file TSMulticastDelegateBase.h.

◆ RemoveAll()

template<typename UserPolicy >
int32 TTSMulticastDelegateBase< UserPolicy >::RemoveAll ( const void * 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.

Definition at line 56 of file TSMulticastDelegateBase.h.

◆ RemoveDelegateInstance()

template<typename UserPolicy >
bool TTSMulticastDelegateBase< 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.

Definition at line 99 of file TSMulticastDelegateBase.h.

Member Data Documentation

◆ CS

template<typename UserPolicy >
FCriticalSection TTSMulticastDelegateBase< UserPolicy >::CS
mutableprivate

Definition at line 106 of file TSMulticastDelegateBase.h.


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