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

Script delegate base class. 更多...

#include <ScriptDelegates.h>

Public 成员函数

void BindUFunction (UObject *InObject, const FName &InFunctionName)
 Binds a UFunction to this delegate. 更多...
 
void Clear ()
 Unbinds this delegate (another name to provide a similar interface to TMulticastScriptDelegate)
 
FName GetFunctionName () const
 Gets the name of the function to call on the bound object 更多...
 
UObject * GetUObject ()
 Gets the object bound to this delegate 更多...
 
const UObject * GetUObject () const
 Gets the object bound to this delegate (const) 更多...
 
UObject * GetUObjectEvenIfUnreachable ()
 Gets the object bound to this delegate, even if the object is unreachable 更多...
 
const UObject * GetUObjectEvenIfUnreachable () const
 Gets the object bound to this delegate (const), even if the object is unreachable 更多...
 
bool IsBound () const
 Checks to see if the user object bound to this delegate is still valid 更多...
 
bool IsBoundToObject (void const *InUserObject) const
 Checks to see if this delegate is bound to the given user object. 更多...
 
bool IsBoundToObjectEvenIfUnreachable (void const *InUserObject) const
 Checks to see if this delegate is bound to the given user object, even if the object is unreachable. 更多...
 
bool IsCompactable () const
 Checks to see if the user object bound to this delegate will ever be valid again 更多...
 
FORCEINLINE bool operator== (const TScriptDelegate &Other) const
 Comparison operators
 
template<class UObjectTemplate >
void ProcessDelegate (void *Parameters) const
 Executes a delegate by calling the named function on the object bound to the delegate. 更多...
 
template<class UObjectTemplate >
FString ToString () const
 Converts this delegate to a string representation 更多...
 
 TScriptDelegate ()
 Default constructor.
 
void Unbind ()
 Unbinds this delegate
 

Protected 属性

FName FunctionName
 Name of the function to call on the bound object
 
TWeakPtr Object
 The object bound to this delegate, or nullptr if no object is bound
 

友元

FArchive & operator<< (FArchive &Ar, TScriptDelegate &D)
 Delegate serialization
 
void operator<< (FStructuredArchive::FSlot Slot, TScriptDelegate &D)
 Delegate serialization
 

详细描述

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

Script delegate base class.

成员函数说明

◆ BindUFunction()

template<typename TWeakPtr = FWeakObjectPtr>
void TScriptDelegate< TWeakPtr >::BindUFunction ( UObject *  InObject,
const FName &  InFunctionName 
)
inline

Binds a UFunction to this delegate.

参数
InObjectThe object to call the function on.
InFunctionNameThe name of the function to call.

◆ GetFunctionName()

template<typename TWeakPtr = FWeakObjectPtr>
FName TScriptDelegate< TWeakPtr >::GetFunctionName ( ) const
inline

Gets the name of the function to call on the bound object

返回
Function name

◆ GetUObject() [1/2]

template<typename TWeakPtr = FWeakObjectPtr>
UObject * TScriptDelegate< TWeakPtr >::GetUObject ( )
inline

Gets the object bound to this delegate

返回
The object

◆ GetUObject() [2/2]

template<typename TWeakPtr = FWeakObjectPtr>
const UObject * TScriptDelegate< TWeakPtr >::GetUObject ( ) const
inline

Gets the object bound to this delegate (const)

返回
The object

◆ GetUObjectEvenIfUnreachable() [1/2]

template<typename TWeakPtr = FWeakObjectPtr>
UObject * TScriptDelegate< TWeakPtr >::GetUObjectEvenIfUnreachable ( )
inline

Gets the object bound to this delegate, even if the object is unreachable

返回
The object

◆ GetUObjectEvenIfUnreachable() [2/2]

template<typename TWeakPtr = FWeakObjectPtr>
const UObject * TScriptDelegate< TWeakPtr >::GetUObjectEvenIfUnreachable ( ) const
inline

Gets the object bound to this delegate (const), even if the object is unreachable

返回
The object

◆ IsBound()

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

Checks to see if the user object bound to this delegate is still valid

返回
True if the object is still valid and it's safe to execute the function call

◆ IsBoundToObject()

template<typename TWeakPtr = FWeakObjectPtr>
bool TScriptDelegate< TWeakPtr >::IsBoundToObject ( void const *  InUserObject) const
inline

Checks to see if this delegate is bound to the given user object.

返回
True if this delegate is bound to InUserObject, false otherwise.

◆ IsBoundToObjectEvenIfUnreachable()

template<typename TWeakPtr = FWeakObjectPtr>
bool TScriptDelegate< TWeakPtr >::IsBoundToObjectEvenIfUnreachable ( void const *  InUserObject) const
inline

Checks to see if this delegate is bound to the given user object, even if the object is unreachable.

返回
True if this delegate is bound to InUserObject, false otherwise.

◆ IsCompactable()

template<typename TWeakPtr = FWeakObjectPtr>
bool TScriptDelegate< TWeakPtr >::IsCompactable ( ) const
inline

Checks to see if the user object bound to this delegate will ever be valid again

返回
True if the object is still valid and it's safe to execute the function call

◆ ProcessDelegate()

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

Executes a delegate by calling the named function on the object bound to the delegate.

You should always first verify that the delegate is safe to execute by calling IsBound() before calling this function. In general, you should never call this function directly. Instead, call Execute() on a derived class.

参数
ParametersParameter structure

◆ ToString()

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

Converts this delegate to a string representation

返回
Delegate in string format

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