Navigation
Unreal Engine C++ API Reference > Runtime > Core > Misc
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Misc/Attribute.h |
Include | #include "Misc/Attribute.h" |
Syntax
template<typename ObjectType>
class TAttribute
Remarks
Attribute object
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TAttribute () |
Default constructor. | |
![]() |
TAttribute
(
const OtherType& InInitialValue |
Construct implicitly from an initial value | |
![]() |
TAttribute
(
ObjectType&& InInitialValue |
Construct implicitly from moving an initial value | |
![]() |
TAttribute
(
TSharedRef< SourceType > InUserObject, |
Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand. | |
![]() |
TAttribute
(
SourceType* InUserObject, |
Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Bind
(
SourceType* InUserObject, |
Binds an arbitrary function that will be called to generate this attribute's value on demand. |
![]() |
void | Bind
(
TSharedRef< SourceType > InUserObject, |
Binds an arbitrary function that will be called to generate this attribute's value on demand. |
![]() |
void | Binds an arbitrary function that will be called to generate this attribute's value on demand. | |
![]() |
void | Binds an arbitrary function that will be called to generate this attribute's value on demand. | |
![]() |
void | BindLambda
(
LambdaType&& InCallable, |
Static: Binds a C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case |
![]() |
void | BindRaw
(
SourceType* InUserObject, |
Binds an arbitrary function that will be called to generate this attribute's value on demand. |
![]() |
void | BindSPLambda
(
const UserClass* InUserObject, |
|
![]() |
void | BindSPLambda
(
const TSharedRef< UserClass, Mode >& InUserObjectRef, |
Static: Binds a weak shared pointer C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case |
![]() |
void | BindStatic
(
TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, |
Binds an arbitrary function that will be called to generate this attribute's value on demand. |
![]() |
void | BindUFunction
(
SourceType* InUserObject, |
Binds an arbitrary function that will be called to generate this attribute's value on demand. |
![]() |
void | BindUObject
(
SourceType* InUserObject, |
Binds an arbitrary function that will be called to generate this attribute's value on demand. |
![]() |
void | BindWeakLambda
(
UserClass* InUserObject, |
Static: Binds a weak object C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case |
![]() ![]() |
TAttribute | Static: Creates an attribute that's pre-bound to the specified 'getter' delegate | |
![]() ![]() |
TAttribute< ObjectType > | ||
![]() ![]() |
TAttribute< ObjectType > | Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. | |
![]() ![]() |
TAttribute | CreateLambda
(
LambdaType&& InCallable, |
Helper function for creating TAttributes from a lambda TAttribute |
![]() ![]() |
TAttribute | Helper function for creating TAttributes from a const member function pointer, accessed through a raw pointer | |
![]() ![]() |
TAttribute | Helper function for creating TAttributes from a const member function pointer, accessed through a weak pointer to the shared object | |
![]() ![]() |
TAttribute | CreateSPLambda
(
const TSharedRef< UserClass, Mode >& InUserObjectRef, |
Helper function for creating TAttributes from a weak shared pointer C++ lambda delegate |
![]() ![]() |
TAttribute | CreateSPLambda
(
UserClass* InUserObject, |
|
![]() ![]() |
TAttribute | CreateStatic
(
FuncPtrType&& InFuncPtr, |
Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. |
![]() ![]() |
TAttribute | CreateStatic
(
TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, |
Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. |
![]() ![]() |
TAttribute | CreateWeakLambda
(
UserClass* InUserObject, |
Helper function for creating TAttributes from a weak object pointer C++ lambda delegate |
![]() ![]() |
const ObjectType & | Get
(
const ObjectType& DefaultValue |
Gets the attribute's current value. |
![]() ![]() |
const ObjectType & | Get () |
Gets the attribute's current value. Assumes that the attribute is set. |
![]() ![]() |
const FGetter & | GetBinding () |
Gets the attribute's 'getter' which can be bound or unbound |
![]() ![]() |
bool | IdenticalTo
(
const TAttribute& InOther |
Is this attribute identical to another TAttribute. |
![]() ![]() |
bool | IsBound () |
Checks to see if this attribute has a 'getter' function bound |
![]() ![]() |
bool | IsSet () |
Was this TAttribute ever assigned? |
![]() |
void | Set
(
const OtherType& InNewValue |
Sets the attribute's value |
![]() |
void | Set
(
ObjectType&& InNewValue |
Sets the attribute's value |
![]() |
TVariant< ObjectType, FGetter > | Steal () |
Move the attribute's 'getter' or the attribute's `Value_ and reset the attribute. |
Typedefs
Name | Description |
---|---|
FGetter | Attribute 'getter' delegateObjectType GetValue() const |