TAttribute

Attribute object

Windows
MacOS
Linux

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

Name Description

Public function

TAttribute()

Default constructor.

Public function

TAttribute

(
    const OtherType& InInitialValue
)

Construct implicitly from an initial value

Public function

TAttribute

(
    TSharedRef< SourceType > InUserObje...,
    typename FGetter::template TSPMetho...
)

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

Public function

TAttribute

(
    SourceType* InUserObject,
    typename FGetter::template TSPMetho...
)

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

Functions

Name Description

Public function

void

 

Bind

(
    TSharedRef< SourceType > InUserObje...,
    typename FGetter::template TSPMetho...
)

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

Public function

void

 

Bind

(
    SourceType* InUserObject,
    typename FGetter::template TSPMetho...
)

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

Public function

void

 

Bind

(
    const FGetter& InGetter
)

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

Public function

void

 

BindRaw

(
    SourceType* InUserObject,
    typename FGetter::template TRawMeth...
)

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

Public function

void

 

BindStatic

(
    typename FGetter::FStaticDelegate::...
)

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

Public function

void

 

BindUFunction

(
    SourceType* InUserObject,
    const FName& InFunctionName
)

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

Public function

void

 

BindUObject

(
    SourceType* InUserObject,
    typename FGetter::template TUObject...
)

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

Public function Static

TAttribute

 

Create

(
    const FGetter& InGetter
)

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

Public function Static

TAttribute< ...

 

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.

Public function Static

TAttribute< ...

 

Create

(
    TFunction< ObjectType(void)>&& InL...
)

Public function Static

TAttribute

 

Create

(
    typename FGetter::FStaticDelegate::...
)

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

Public function Const

const Object...

 

Get

(
    const ObjectType& DefaultValue
)

Gets the attribute's current value.

Public function Const

const Object...

 

Get()

Gets the attribute's current value. Assumes that the attribute is set.

Public function Const

const FGette...

 

GetBinding()

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

Public function Const

bool

 

IdenticalTo

(
    const TAttribute& InOther
)

Is this attribute identical to another TAttribute.

Public function Const

bool

 

IsBound()

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

Public function Const

bool

 

IsSet()

Was this TAttribute ever assigned?

Public function

void

 

Set

(
    const OtherType& InNewValue
)

Sets the attribute's value

Typedefs

Name

Description

FGetter

Attribute 'getter' delegate

ObjectType GetValue() const

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback