TAttribute

Copyright Epic Games, Inc. All Rights Reserved.

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

(
    ObjectType&& InInitialValue
)

Construct implicitly from moving 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

(
    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

 

Bind

(
    FGetter&& InGetter
)

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

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

 

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

(
    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 Static

TAttribute

 

Create

(
    const FGetter& InGetter
)

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

Public function Const

const Object...

 

Get()

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

Public function Const

const Object...

 

Get

(
    const ObjectType& DefaultValue
)

Gets the attribute's current value.

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

Public function

void

 

Set

(
    ObjectType&& InNewValue
)

Sets the attribute's value

Typedefs

Name

Description

FGetter

Attribute 'getter' delegate

ObjectType GetValue() const

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss