engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 友元 | 所有成员列表
TMulticastScriptDelegate< TWeakPtr > 模板类 参考

Script multi-cast delegate base class 更多...

#include <ScriptDelegates.h>

Public 成员函数

void Add (const TScriptDelegate< TWeakPtr > &InDelegate)
 Adds a function delegate to this multi-cast delegate's invocation list 更多...
 
void AddUnique (const TScriptDelegate< TWeakPtr > &InDelegate)
 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 更多...
 
void Clear ()
 Removes all functions from this delegate's invocation list
 
bool Contains (const TScriptDelegate< TWeakPtr > &InDelegate) const
 Checks whether a function delegate is already a member of this multi-cast delegate's invocation list 更多...
 
bool Contains (const UObject *InObject, FName InFunctionName) const
 Checks whether a function delegate is already a member of this multi-cast delegate's invocation list 更多...
 
TArray< UObject * > GetAllObjects () const
 Returns all objects associated with this multicast-delegate. 更多...
 
TArray< UObject * > GetAllObjectsEvenIfUnreachable () const
 Returns all objects associated with this multicast-delegate, even if unreachable. 更多...
 
bool IsBound () const
 Checks to see if any functions are bound to this multi-cast delegate 更多...
 
template<class UObjectTemplate >
void ProcessMulticastDelegate (void *Parameters) const
 Executes a multi-cast delegate by calling all functions on objects bound to the delegate. 更多...
 
void Remove (const TScriptDelegate< TWeakPtr > &InDelegate)
 Removes a function from this multi-cast delegate's invocation list (performance is O(N)). 更多...
 
void Remove (const UObject *InObject, FName InFunctionName)
 Removes a function from this multi-cast delegate's invocation list (performance is O(N)). 更多...
 
void RemoveAll (const UObject *Object)
 Removes all delegate bindings from this multicast delegate's invocation list that are bound to the specified object. 更多...
 
 TMulticastScriptDelegate ()
 Default constructor
 
template<typename UObjectTemplate >
FString ToString () const
 Converts this delegate to a string representation 更多...
 

Protected 成员函数

void AddInternal (const TScriptDelegate< TWeakPtr > &InDelegate)
 Adds a function delegate to this multi-cast delegate's invocation list 更多...
 
void AddUniqueInternal (const TScriptDelegate< TWeakPtr > &InDelegate)
 Adds a function delegate to this multi-cast delegate's invocation list, if a delegate with that signature doesn't already exist 更多...
 
void CompactInvocationList () const
 Cleans up any delegates in our invocation list that have expired (performance is O(N))
 
void RemoveInternal (const TScriptDelegate< TWeakPtr > &InDelegate) const
 Removes a function from this multi-cast delegate's invocation list (performance is O(N)). 更多...
 
void RemoveInternal (const UObject *InObject, FName InFunctionName) const
 Removes a function from this multi-cast delegate's invocation list (performance is O(N)). 更多...
 

Protected 属性

FInvocationList InvocationList
 Ordered list functions to invoke when the Broadcast function is called
 

友元

class FMulticastDelegateProperty
 
FArchive & operator<< (FArchive &Ar, TMulticastScriptDelegate< TWeakPtr > &D)
 Multi-cast delegate serialization
 
struct TIsZeroConstructType< TMulticastScriptDelegate< TWeakPtr > >
 

详细描述

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

Script multi-cast delegate base class

成员函数说明

◆ 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

参数
InDelegateDelegate to add

◆ 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

参数
InDelegateDelegate to add

◆ 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

参数
InDelegateDelegate to add

◆ 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

参数
InDelegateDelegate to add

◆ 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

参数
InDelegateDelegate to check
返回
True if the delegate is already in the list.

◆ 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

参数
InObjectObject of the delegate to check
InFunctionNameFunction name of the delegate to check
返回
True if the delegate is already in the list.

◆ 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.

返回
List of objects bound to this delegate

◆ 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.

返回
List of objects bound to this delegate

◆ IsBound()

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

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

返回
True if any functions are bound

◆ 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.

参数
ParamsParameter structure

◆ 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!

参数
InDelegateDelegate to remove

◆ 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!

参数
InObjectObject of the delegate to remove
InFunctionNameFunction name of the delegate to remove

◆ 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.

参数
InObjectThe object to remove bindings for.

◆ 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!

参数
InDelegateDelegate to remove

◆ 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!

参数
InObjectObject of the delegate to remove
InFunctionNameFunction name of the delegate to remove

◆ ToString()

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

Converts this delegate to a string representation

返回
Delegate in string format

该类的文档由以下文件生成: