engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
TAttribute< ObjectType > 模板类 参考

Attribute object 更多...

#include <Attribute.h>

Public 成员函数

void Bind (const FGetter &InGetter)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
void Bind (FGetter &&InGetter)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
template<class SourceType >
void Bind (SourceType *InUserObject, typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr InMethodPtr)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
template<class SourceType >
void Bind (TSharedRef< SourceType > InUserObject, typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr InMethodPtr)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
template<class SourceType >
void BindRaw (SourceType *InUserObject, typename FGetter::template TRawMethodDelegate_Const< SourceType >::FMethodPtr InMethodPtr)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
void BindStatic (typename FGetter::FStaticDelegate::FFuncPtr InFuncPtr)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
template<class SourceType >
void BindUFunction (SourceType *InUserObject, const FName &InFunctionName)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
template<class SourceType >
void BindUObject (SourceType *InUserObject, typename FGetter::template TUObjectMethodDelegate_Const< SourceType >::FMethodPtr InMethodPtr)
 Binds an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
 DECLARE_DELEGATE_RetVal (ObjectType, FGetter)
 Attribute 'getter' delegate 更多...
 
const ObjectType & Get () const
 Gets the attribute's current value. 更多...
 
const ObjectType & Get (const ObjectType &DefaultValue) const
 Gets the attribute's current value. 更多...
 
const FGetter & GetBinding () const
 Gets the attribute's 'getter' which can be bound or unbound 更多...
 
bool IdenticalTo (const TAttribute &InOther) const
 Is this attribute identical to another TAttribute. 更多...
 
bool IsBound () const
 Checks to see if this attribute has a 'getter' function bound 更多...
 
bool IsSet () const
 Was this TAttribute ever assigned?
 
template<typename OtherType >
void Set (const OtherType &InNewValue)
 Sets the attribute's value 更多...
 
void Set (ObjectType &&InNewValue)
 Sets the attribute's value 更多...
 
 TAttribute ()
 Default constructor.
 
template<typename OtherType >
 TAttribute (const OtherType &InInitialValue)
 Construct implicitly from an initial value 更多...
 
 TAttribute (ObjectType &&InInitialValue)
 Construct implicitly from moving an initial value 更多...
 
template<class SourceType >
 TAttribute (SourceType *InUserObject, typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr InMethodPtr)
 Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
template<class SourceType >
 TAttribute (TSharedRef< SourceType > InUserObject, typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr InMethodPtr)
 Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 

静态 Public 成员函数

static TAttribute Create (const FGetter &InGetter)
 Static: Creates an attribute that's pre-bound to the specified 'getter' delegate 更多...
 
template<class SourceType >
static TAttribute< ObjectType > Create (SourceType *InUserObject, const FName &InFunctionName)
 Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 
static TAttribute Create (typename FGetter::FStaticDelegate::FFuncPtr InFuncPtr)
 Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. 更多...
 

详细描述

template<typename ObjectType>
class TAttribute< ObjectType >

Attribute object

示例
/github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

构造及析构函数说明

◆ TAttribute() [1/4]

template<typename ObjectType >
template<typename OtherType >
TAttribute< ObjectType >::TAttribute ( const OtherType &  InInitialValue)
inline

Construct implicitly from an initial value

参数
InInitialValueThe value for this attribute

◆ TAttribute() [2/4]

template<typename ObjectType >
TAttribute< ObjectType >::TAttribute ( ObjectType &&  InInitialValue)
inline

Construct implicitly from moving an initial value

参数
InInitialValue

◆ TAttribute() [3/4]

template<typename ObjectType >
template<class SourceType >
TAttribute< ObjectType >::TAttribute ( TSharedRef< SourceType >  InUserObject,
typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr  InMethodPtr 
)
inline

Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectShared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
InMethodPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ TAttribute() [4/4]

template<typename ObjectType >
template<class SourceType >
TAttribute< ObjectType >::TAttribute ( SourceType *  InUserObject,
typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr  InMethodPtr 
)
inline

Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectShared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
InMethodPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

成员函数说明

◆ Bind() [1/4]

template<typename ObjectType >
void TAttribute< ObjectType >::Bind ( const FGetter &  InGetter)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InGetterThe delegate object with your function binding

◆ Bind() [2/4]

template<typename ObjectType >
void TAttribute< ObjectType >::Bind ( FGetter &&  InGetter)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InGetterThe delegate object with your function binding

◆ Bind() [3/4]

template<typename ObjectType >
template<class SourceType >
void TAttribute< ObjectType >::Bind ( SourceType *  InUserObject,
typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr  InMethodPtr 
)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectShared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
InMethodPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ Bind() [4/4]

template<typename ObjectType >
template<class SourceType >
void TAttribute< ObjectType >::Bind ( TSharedRef< SourceType >  InUserObject,
typename FGetter::template TSPMethodDelegate_Const< SourceType >::FMethodPtr  InMethodPtr 
)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectShared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
InMethodPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ BindRaw()

template<typename ObjectType >
template<class SourceType >
void TAttribute< ObjectType >::BindRaw ( SourceType *  InUserObject,
typename FGetter::template TRawMethodDelegate_Const< SourceType >::FMethodPtr  InMethodPtr 
)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectInstance of the class that contains the member function you want to bind.
InMethodPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ BindStatic()

template<typename ObjectType >
void TAttribute< ObjectType >::BindStatic ( typename FGetter::FStaticDelegate::FFuncPtr  InFuncPtr)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InFuncPtrFunction to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ BindUFunction()

template<typename ObjectType >
template<class SourceType >
void TAttribute< ObjectType >::BindUFunction ( SourceType *  InUserObject,
const FName &  InFunctionName 
)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectInstance of the class that contains the member function you want to bind.
InFunctionNameMember function name to bind.

◆ BindUObject()

template<typename ObjectType >
template<class SourceType >
void TAttribute< ObjectType >::BindUObject ( SourceType *  InUserObject,
typename FGetter::template TUObjectMethodDelegate_Const< SourceType >::FMethodPtr  InMethodPtr 
)
inline

Binds an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectInstance of the class that contains the member function you want to bind.
InMethodPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ Create() [1/3]

template<typename ObjectType >
static TAttribute TAttribute< ObjectType >::Create ( const FGetter &  InGetter)
inlinestatic

Static: Creates an attribute that's pre-bound to the specified 'getter' delegate

参数
InGetterDelegate to bind

◆ Create() [2/3]

template<typename ObjectType >
template<class SourceType >
static TAttribute< ObjectType > TAttribute< ObjectType >::Create ( SourceType *  InUserObject,
const FName &  InFunctionName 
)
inlinestatic

Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InUserObjectInstance of the class that contains the member function you want to bind.
InFunctionNameMember function name to bind.

◆ Create() [3/3]

template<typename ObjectType >
static TAttribute TAttribute< ObjectType >::Create ( typename FGetter::FStaticDelegate::FFuncPtr  InFuncPtr)
inlinestatic

Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand.

After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.

参数
InFuncPtrMember function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.

◆ DECLARE_DELEGATE_RetVal()

template<typename ObjectType >
TAttribute< ObjectType >::DECLARE_DELEGATE_RetVal ( ObjectType  ,
FGetter   
)

Attribute 'getter' delegate

ObjectType GetValue() const

返回
The attribute's value

◆ Get() [1/2]

template<typename ObjectType >
const ObjectType & TAttribute< ObjectType >::Get ( ) const
inline

Gets the attribute's current value.

Assumes that the attribute is set.

返回
The attribute's value
示例
/github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

◆ Get() [2/2]

template<typename ObjectType >
const ObjectType & TAttribute< ObjectType >::Get ( const ObjectType &  DefaultValue) const
inline

Gets the attribute's current value.

The attribute may not be set, in which case use the default value provided. Shorthand for the boilerplate code: MyAttribute.IsSet() ? MyAttribute.Get() : DefaultValue

◆ GetBinding()

template<typename ObjectType >
const FGetter & TAttribute< ObjectType >::GetBinding ( ) const
inline

Gets the attribute's 'getter' which can be bound or unbound

返回
The attribute's FGetter.

◆ IdenticalTo()

template<typename ObjectType >
bool TAttribute< ObjectType >::IdenticalTo ( const TAttribute< ObjectType > &  InOther) const
inline

Is this attribute identical to another TAttribute.

参数
InOtherThe other attribute to compare with.
返回
true if the attributes are identical, false otherwise.

◆ IsBound()

template<typename ObjectType >
bool TAttribute< ObjectType >::IsBound ( ) const
inline

Checks to see if this attribute has a 'getter' function bound

返回
True if attribute is bound to a getter function

◆ Set() [1/2]

template<typename ObjectType >
template<typename OtherType >
void TAttribute< ObjectType >::Set ( const OtherType &  InNewValue)
inline

Sets the attribute's value

参数
InNewValueThe value to set the attribute to

◆ Set() [2/2]

template<typename ObjectType >
void TAttribute< ObjectType >::Set ( ObjectType &&  InNewValue)
inline

Sets the attribute's value

参数
InNewValueThe value to set the attribute to

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