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

#include <ScriptDelegates.h>

+ Collaboration diagram for TMulticastScriptDelegate< TWeakPtr >:

Public Types

typedef TArray< TScriptDelegate< TWeakPtr > > FInvocationList
 

Public Member Functions

 TMulticastScriptDelegate ()
 
bool IsBound () const
 
bool Contains (const TScriptDelegate< TWeakPtr > &InDelegate) const
 
bool Contains (const UObject *InObject, FName InFunctionName) const
 
void Add (const TScriptDelegate< TWeakPtr > &InDelegate)
 
void AddUnique (const TScriptDelegate< TWeakPtr > &InDelegate)
 
void Remove (const TScriptDelegate< TWeakPtr > &InDelegate)
 
void Remove (const UObject *InObject, FName InFunctionName)
 
void RemoveAll (const UObject *Object)
 
void Clear ()
 
template<typename UObjectTemplate >
FString ToString () const
 
template<class UObjectTemplate >
void ProcessMulticastDelegate (void *Parameters) const
 
TArray< UObject * > GetAllObjects () const
 
TArray< UObject * > GetAllObjectsEvenIfUnreachable () const
 
SIZE_T GetAllocatedSize () const
 

Protected Member Functions

void AddInternal (const TScriptDelegate< TWeakPtr > &InDelegate)
 
void AddUniqueInternal (const TScriptDelegate< TWeakPtr > &InDelegate)
 
void RemoveInternal (const TScriptDelegate< TWeakPtr > &InDelegate) const
 
void RemoveInternal (const UObject *InObject, FName InFunctionName) const
 
void CompactInvocationList () const
 
 UE_DELEGATES_MT_ACCESS_DETECTOR (AccessDetector)
 

Protected Attributes

FInvocationList InvocationList
 

Friends

class FMulticastDelegateProperty
 
class FMulticastInlineDelegateProperty
 
class FMulticastSparseDelegateProperty
 
class FCallDelegateHelper
 
struct TIsZeroConstructType< TMulticastScriptDelegate< TWeakPtr > >
 
FArchiveoperator<< (FArchive &Ar, TMulticastScriptDelegate< TWeakPtr > &D)
 
void operator<< (FStructuredArchive::FSlot Slot, TMulticastScriptDelegate< TWeakPtr > &D)
 

Detailed Description

template<typename TWeakPtr = FWeakObjectPtr>
class TMulticastScriptDelegate< TWeakPtr >

Script multi-cast delegate base class

Definition at line 321 of file ScriptDelegates.h.

Member Typedef Documentation

◆ FInvocationList

template<typename TWeakPtr = FWeakObjectPtr>
typedef TArray< TScriptDelegate<TWeakPtr> > TMulticastScriptDelegate< TWeakPtr >::FInvocationList

Definition at line 702 of file ScriptDelegates.h.

Constructor & Destructor Documentation

◆ TMulticastScriptDelegate()

Default constructor

Definition at line 328 of file ScriptDelegates.h.

Member Function Documentation

◆ Add()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::Add ( const TScriptDelegate< TWeakPtr > & InDelegate)
inline

Adds a function delegate to this multi-cast delegate's invocation list

Parameters
InDelegateDelegate to add

Definition at line 378 of file ScriptDelegates.h.

◆ AddInternal()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::AddInternal ( const TScriptDelegate< TWeakPtr > & InDelegate)
inlineprotected

Adds a function delegate to this multi-cast delegate's invocation list

Parameters
InDelegateDelegate to add

Definition at line 638 of file ScriptDelegates.h.

◆ AddUnique()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::AddUnique ( const TScriptDelegate< TWeakPtr > & InDelegate)
inline

Adds a function delegate to this multi-cast delegate's invocation list if a delegate with the same signature doesn't already exist in the invocation list

Parameters
InDelegateDelegate to add

Definition at line 395 of file ScriptDelegates.h.

◆ AddUniqueInternal()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::AddUniqueInternal ( const TScriptDelegate< TWeakPtr > & InDelegate)
inlineprotected

Adds a function delegate to this multi-cast delegate's invocation list, if a delegate with that signature doesn't already exist

Parameters
InDelegateDelegate to add

Definition at line 657 of file ScriptDelegates.h.

◆ Clear()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::Clear ( )
inline

Removes all functions from this delegate's invocation list

Definition at line 467 of file ScriptDelegates.h.

◆ CompactInvocationList()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::CompactInvocationList ( ) const
inlineprotected

Cleans up any delegates in our invocation list that have expired (performance is O(N))

Definition at line 694 of file ScriptDelegates.h.

◆ Contains() [1/2]

template<typename TWeakPtr = FWeakObjectPtr>
bool TMulticastScriptDelegate< TWeakPtr >::Contains ( const TScriptDelegate< TWeakPtr > & InDelegate) const
inline

Checks whether a function delegate is already a member of this multi-cast delegate's invocation list

Parameters
InDelegateDelegate to check
Returns
True if the delegate is already in the list.

Definition at line 350 of file ScriptDelegates.h.

◆ Contains() [2/2]

template<typename TWeakPtr = FWeakObjectPtr>
bool TMulticastScriptDelegate< TWeakPtr >::Contains ( const UObject * InObject,
FName InFunctionName ) const
inline

Checks whether a function delegate is already a member of this multi-cast delegate's invocation list

Parameters
InObjectObject of the delegate to check
InFunctionNameFunction name of the delegate to check
Returns
True if the delegate is already in the list.

Definition at line 364 of file ScriptDelegates.h.

◆ GetAllObjects()

template<typename TWeakPtr = FWeakObjectPtr>
TArray< UObject * > TMulticastScriptDelegate< TWeakPtr >::GetAllObjects ( ) const
inline

Returns all objects associated with this multicast-delegate. For advanced uses only – you should never need call this function in normal circumstances.

Returns
List of objects bound to this delegate

Definition at line 586 of file ScriptDelegates.h.

◆ GetAllObjectsEvenIfUnreachable()

template<typename TWeakPtr = FWeakObjectPtr>
TArray< UObject * > TMulticastScriptDelegate< TWeakPtr >::GetAllObjectsEvenIfUnreachable ( ) const
inline

Returns all objects associated with this multicast-delegate, even if unreachable. For advanced uses only – you should never need call this function in normal circumstances.

Returns
List of objects bound to this delegate

Definition at line 607 of file ScriptDelegates.h.

◆ GetAllocatedSize()

template<typename TWeakPtr = FWeakObjectPtr>
SIZE_T TMulticastScriptDelegate< TWeakPtr >::GetAllocatedSize ( ) const
inline

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

Definition at line 626 of file ScriptDelegates.h.

◆ IsBound()

template<typename TWeakPtr = FWeakObjectPtr>
bool TMulticastScriptDelegate< TWeakPtr >::IsBound ( ) const
inline

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

Returns
True if any functions are bound

Definition at line 337 of file ScriptDelegates.h.

◆ ProcessMulticastDelegate()

template<typename TWeakPtr = FWeakObjectPtr>
template<class UObjectTemplate >
void TMulticastScriptDelegate< TWeakPtr >::ProcessMulticastDelegate ( void * Parameters) const
inline

Executes a multi-cast delegate by calling all functions on objects bound to the delegate. Always safe to call, even if when no objects are bound, or if objects have expired. In general, you should never call this function directly. Instead, call Broadcast() on a derived class.

Parameters
ParamsParameter structure

Definition at line 554 of file ScriptDelegates.h.

◆ Remove() [1/2]

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::Remove ( const TScriptDelegate< TWeakPtr > & InDelegate)
inline

Removes a function from this multi-cast delegate's invocation list (performance is O(N)). Note that the order of the delegates may not be preserved!

Parameters
InDelegateDelegate to remove

Definition at line 412 of file ScriptDelegates.h.

◆ Remove() [2/2]

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::Remove ( const UObject * InObject,
FName InFunctionName )
inline

Removes a function from this multi-cast delegate's invocation list (performance is O(N)). Note that the order of the delegates may not be preserved!

Parameters
InObjectObject of the delegate to remove
InFunctionNameFunction name of the delegate to remove

Definition at line 430 of file ScriptDelegates.h.

◆ RemoveAll()

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::RemoveAll ( const UObject * Object)
inline

Removes all delegate bindings from this multicast delegate's invocation list that are bound to the specified object.

This method also compacts the invocation list.

Parameters
InObjectThe object to remove bindings for.

Definition at line 449 of file ScriptDelegates.h.

◆ RemoveInternal() [1/2]

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::RemoveInternal ( const TScriptDelegate< TWeakPtr > & InDelegate) const
inlineprotected

Removes a function from this multi-cast delegate's invocation list (performance is O(N)). Note that the order of the delegates may not be preserved!

Parameters
InDelegateDelegate to remove

Definition at line 669 of file ScriptDelegates.h.

◆ RemoveInternal() [2/2]

template<typename TWeakPtr = FWeakObjectPtr>
void TMulticastScriptDelegate< TWeakPtr >::RemoveInternal ( const UObject * InObject,
FName InFunctionName ) const
inlineprotected

Removes a function from this multi-cast delegate's invocation list (performance is O(N)). Note that the order of the delegates may not be preserved!

Parameters
InObjectObject of the delegate to remove
InFunctionNameFunction name of the delegate to remove

Definition at line 681 of file ScriptDelegates.h.

◆ ToString()

template<typename TWeakPtr = FWeakObjectPtr>
FString TMulticastScriptDelegate< TWeakPtr >::ToString ( ) const
inline

Converts this delegate to a string representation

Returns
Delegate in string format

Definition at line 480 of file ScriptDelegates.h.

◆ UE_DELEGATES_MT_ACCESS_DETECTOR()

template<typename TWeakPtr = FWeakObjectPtr>
TMulticastScriptDelegate< TWeakPtr >::UE_DELEGATES_MT_ACCESS_DETECTOR ( AccessDetector )
protected

Friends And Related Symbol Documentation

◆ FCallDelegateHelper

template<typename TWeakPtr = FWeakObjectPtr>
friend class FCallDelegateHelper
friend

Definition at line 717 of file ScriptDelegates.h.

◆ FMulticastDelegateProperty

template<typename TWeakPtr = FWeakObjectPtr>
friend class FMulticastDelegateProperty
friend

Definition at line 712 of file ScriptDelegates.h.

◆ FMulticastInlineDelegateProperty

template<typename TWeakPtr = FWeakObjectPtr>
friend class FMulticastInlineDelegateProperty
friend

Definition at line 713 of file ScriptDelegates.h.

◆ FMulticastSparseDelegateProperty

template<typename TWeakPtr = FWeakObjectPtr>
friend class FMulticastSparseDelegateProperty
friend

Definition at line 714 of file ScriptDelegates.h.

◆ operator<< [1/2]

template<typename TWeakPtr = FWeakObjectPtr>
FArchive & operator<< ( FArchive & Ar,
TMulticastScriptDelegate< TWeakPtr > & D )
friend

Multi-cast delegate serialization

Definition at line 504 of file ScriptDelegates.h.

◆ operator<< [2/2]

template<typename TWeakPtr = FWeakObjectPtr>
void operator<< ( FStructuredArchive::FSlot Slot,
TMulticastScriptDelegate< TWeakPtr > & D )
friend

Definition at line 525 of file ScriptDelegates.h.

◆ TIsZeroConstructType< TMulticastScriptDelegate< TWeakPtr > >

Definition at line 717 of file ScriptDelegates.h.

Member Data Documentation

◆ InvocationList

template<typename TWeakPtr = FWeakObjectPtr>
FInvocationList TMulticastScriptDelegate< TWeakPtr >::InvocationList
mutableprotected

Ordered list functions to invoke when the Broadcast function is called

Definition at line 707 of file ScriptDelegates.h.


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