UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Editor::DataStorage::FAttributeBinder Class Reference

#include <TypedElementAttributeBinding.h>

Public Member Functions

TYPEDELEMENTFRAMEWORK_API FAttributeBinder (RowHandle InTargetRow)
 
TYPEDELEMENTFRAMEWORK_API FAttributeBinder (RowHandle InTargetRow, ICoreProvider *InDataStorage)
 
template<typename AttributeType , TDataColumnType ColumnType>
TAttribute< AttributeType > BindData (AttributeType ColumnType::*InVariable, const AttributeType &InDefaultValue=AttributeType())
 
template<typename AttributeType , TDynamicColumnTemplate ColumnType>
TAttribute< AttributeType > BindData (const FName &InIdentifier, AttributeType ColumnType::*InVariable, const AttributeType &InDefaultValue=AttributeType())
 
template<typename AttributeType , typename DataType , TDataColumnType ColumnType>
TAttribute< AttributeType > BindData (DataType ColumnType::*InVariable, TFunction< AttributeType(const DataType &)> InConverter, const DataType &InDefaultValue=DataType())
 
template<typename AttributeType , typename DataType , TDynamicColumnTemplate ColumnType>
TAttribute< AttributeType > BindData (const FName &InIdentifier, DataType ColumnType::*InVariable, TFunction< AttributeType(const DataType &)> InConverter, const DataType &InDefaultValue=DataType())
 
template<typename DataType , TDataColumnType ColumnType, typename FunctionType >
requires DataStorage::Private::AttributeBinderInvocable<FunctionType, DataType>
auto BindData (DataType ColumnType::*InVariable, FunctionType &&InConverter, const DataType &InDefaultValue=DataType())
 
template<typename DataType , TDynamicColumnTemplate ColumnType, typename FunctionType >
requires DataStorage::Private::AttributeBinderInvocable<FunctionType, DataType>
auto BindData (const FName &InIdentifier, DataType ColumnType::*InVariable, FunctionType &&InConverter, const DataType &InDefaultValue=DataType())
 
template<typename AttributeType , TDataColumnType ColumnType>
TAttribute< AttributeType > BindColumn (TFunction< AttributeType(const ColumnType &)> InConverter)
 
template<TDataColumnType ColumnType, typename FunctionType >
requires DataStorage::Private::AttributeBinderColumnInvocable<FunctionType, ColumnType>
auto BindColumn (FunctionType &&InConverter)
 
template<typename AttributeType >
TAttribute< AttributeType > BindColumnData (const TWeakObjectPtr< const UScriptStruct > &InColumnType, const TFunction< AttributeType(const TWeakObjectPtr< const UScriptStruct > &, const void *)> &InConverter)
 
template<typename FunctionType >
requires DataStorage::Private::AttributeBinderColumnDataInvocable<FunctionType>
auto BindColumnData (const TWeakObjectPtr< const UScriptStruct > &InColumnType, FunctionType &&InConverter)
 
template<typename InRetValType , typename... ParamTypes, TDataColumnType ColumnType>
TDelegate< InRetValType(ParamTypes...)> BindEvent (TDelegate< InRetValType(ParamTypes...)> ColumnType::*InVariable)
 
template<typename InRetValType , typename... ParamTypes, TDynamicColumnTemplate ColumnType>
TDelegate< InRetValType(ParamTypes...)> BindEvent (const FName &InIdentifier, TDelegate< InRetValType(ParamTypes...)> ColumnType::*InVariable)
 
template<TDataColumnType ColumnType>
TAttribute< FTextBindText (FString ColumnType::*InFStringVariable)
 
template<TDynamicColumnTemplate ColumnType>
TAttribute< FTextBindText (const FName &InIdentifier, FString ColumnType::*InFStringVariable)
 
template<TDataColumnType ColumnType>
TAttribute< FTextBindText (FName ColumnType::*InFNameVariable)
 
template<TDynamicColumnTemplate ColumnType>
TAttribute< FTextBindText (const FName &InIdentifier, FName ColumnType::*InFNameVariable)
 
TYPEDELEMENTFRAMEWORK_API FTextAttributeFormatted BindTextFormat (FTextFormat Format) const
 

Detailed Description

Builder class that can be used as a shorthand to bind data inside a TEDS row, column pair to a TAttribute so the attribute updates if the data in the column is changed.

Usage Example:

FAttributeBinder Binder(RowHandle); TAttribute<int> TestAttribute(Binder.BindData(&FTestColumnInt::TestInt))

Constructor & Destructor Documentation

◆ FAttributeBinder() [1/2]

UE::Editor::DataStorage::FAttributeBinder::FAttributeBinder ( RowHandle  InTargetRow)

◆ FAttributeBinder() [2/2]

UE::Editor::DataStorage::FAttributeBinder::FAttributeBinder ( RowHandle  InTargetRow,
ICoreProvider InDataStorage 
)

Member Function Documentation

◆ BindColumn() [1/2]

template<TDataColumnType ColumnType, typename FunctionType >
requires DataStorage::Private::AttributeBinderColumnInvocable<FunctionType, ColumnType>
auto UE::Editor::DataStorage::FAttributeBinder::BindColumn ( FunctionType &&  InConverter)

Overload for the BindColumn to accept lambdas instead of TFunctions

Parameters
InConverterConversion function to convert from DataType -> AttributeType
Returns
A TAttribute bound to the row, column pair specified

◆ BindColumn() [2/2]

template<typename AttributeType , TDataColumnType ColumnType>
TAttribute< AttributeType > UE::Editor::DataStorage::FAttributeBinder::BindColumn ( TFunction< AttributeType(const ColumnType &)>  InConverter)

Bind a whole TEDS column to a slate attribute (instead of a single member variable). This allows you to derive an attribute from multiple members of a TEDS column

Parameters
InConverterConversion function to convert from ColumnType -> AttributeType
Returns
A TAttribute bound to the row, column pair specified

Example: const TAttribute TestIntAttribute(Binder.BindColumn<FTestColumnInt>([](const FTestColumnInt& Column) { return Column.TestInt1 + Column.TestInt2; }

◆ BindColumnData() [1/2]

template<typename AttributeType >
TAttribute< AttributeType > UE::Editor::DataStorage::FAttributeBinder::BindColumnData ( const TWeakObjectPtr< const UScriptStruct > &  InColumnType,
const TFunction< AttributeType(const TWeakObjectPtr< const UScriptStruct > &, const void *)> &  InConverter 
)

Bind a whole TEDS column to a slate attribute (instead of a single member variable) using the column's typeinfo.

Parameters
InColumnTypeThe typeinfo of the column (e.g FTestIntColumn::StaticStruct)
InConverterConversion function to convert from const void* ColumnData -> AttributeType
Returns
A TAttribute bound to the row, column pair specified

Example: const TAttribute TestIntAttribute(Binder.BindColumnData(FTestColumnInt::StaticStruct(), [](const TWeakObjectPtr<const UScriptStruct>& ColumnType, const void* ColumnData) { return static_cast<const FTestColumnInt*>(ColumnData)->TestInt; }

◆ BindColumnData() [2/2]

template<typename FunctionType >
requires DataStorage::Private::AttributeBinderColumnDataInvocable<FunctionType>
auto UE::Editor::DataStorage::FAttributeBinder::BindColumnData ( const TWeakObjectPtr< const UScriptStruct > &  InColumnType,
FunctionType &&  InConverter 
)

Overload for the BindColumnData to accept lambdas instead of TFunctions

Parameters
InConverterConversion function to convert from const void* ColumnData -> AttributeType
Returns
A TAttribute bound to the row, column pair specified

◆ BindData() [1/6]

template<typename AttributeType , TDataColumnType ColumnType>
TAttribute< AttributeType > UE::Editor::DataStorage::FAttributeBinder::BindData ( AttributeType ColumnType::*  InVariable,
const AttributeType &  InDefaultValue = AttributeType() 
)

Bind a specific data member inside a TEDS column to an attribute of the same type as the data

Parameters
InVariableThe data member inside a column to be bound
InDefaultValueThe default value to be used when the column isn't present on a row

Example: FAttributeBinder Binder(RowHandle); TAttribute<FString> TestAttribute(Binder.BindData(&FTypedElementLabelColumn::Label))

◆ BindData() [2/6]

template<typename AttributeType , TDynamicColumnTemplate ColumnType>
TAttribute< AttributeType > UE::Editor::DataStorage::FAttributeBinder::BindData ( const FName InIdentifier,
AttributeType ColumnType::*  InVariable,
const AttributeType &  InDefaultValue = AttributeType() 
)

Bind a specific data member inside a TEDS column to an attribute of the same type as the data

Parameters
InVariableThe data member inside a column to be bound
InDefaultValueThe default value to be used when the column isn't present on a row
InIdentifierThe identifier for this dynamic column
Returns
A TAttribute bound to the row, column pair specified

Example: FAttributeBinder Binder(RowHandle); TAttribute<FString> TestAttribute(Binder.BindData(&FTypedElementLabelColumn::Label, FName(TEXT("Id"))))

◆ BindData() [3/6]

template<typename DataType , TDynamicColumnTemplate ColumnType, typename FunctionType >
requires DataStorage::Private::AttributeBinderInvocable<FunctionType, DataType>
auto UE::Editor::DataStorage::FAttributeBinder::BindData ( const FName InIdentifier,
DataType ColumnType::*  InVariable,
FunctionType &&  InConverter,
const DataType &  InDefaultValue = DataType() 
)

Overload for the conversion binder to accept lambdas instead of TFunctions

Parameters
InVariableThe data member inside a column to be bound
InConverterConversion function to convert from DataType -> AttributeType
InDefaultValueThe default value to be used when the column isn't present on a row\
InIdentifierThe identifier for this column if it is a dynamic column, NAME_None if it is not a dynamic column
Returns
A TAttribute bound to the row, column pair specified

◆ BindData() [4/6]

template<typename AttributeType , typename DataType , TDynamicColumnTemplate ColumnType>
TAttribute< AttributeType > UE::Editor::DataStorage::FAttributeBinder::BindData ( const FName InIdentifier,
DataType ColumnType::*  InVariable,
TFunction< AttributeType(const DataType &)>  InConverter,
const DataType &  InDefaultValue = DataType() 
)

Bind a specific data member inside a TEDS column to an attribute of a different type than the data by providing a conversion function NOTE: the default value is not the actual attribute type but rather the data type in the column and it gets passed to the conversion function

Parameters
InVariableThe data member inside a column to be bound
InConverterConversion function to convert from DataType -> AttributeType
InIdentifierThe identifier for this column if it is a dynamic column
InDefaultValueThe default value to be used when the column isn't present on a row
Returns
A TAttribute bound to the row, column pair specified

Example: UE::Editor::DataStorage::FAttributeBinder Binder(RowHandle); TAttribute<FText> TestAttribute(Binder.BindData(&FTypedElementLabelColumn::Label), [](const FString& Data) { return FText::FromString(Data); } ));

◆ BindData() [5/6]

template<typename DataType , TDataColumnType ColumnType, typename FunctionType >
requires DataStorage::Private::AttributeBinderInvocable<FunctionType, DataType>
auto UE::Editor::DataStorage::FAttributeBinder::BindData ( DataType ColumnType::*  InVariable,
FunctionType &&  InConverter,
const DataType &  InDefaultValue = DataType() 
)

Overload for the conversion binder to accept lambdas instead of TFunctions

Parameters
InVariableThe data member inside a column to be bound
InConverterConversion function to convert from DataType -> AttributeType
InDefaultValueThe default value to be used when the column isn't present on a row\

◆ BindData() [6/6]

template<typename AttributeType , typename DataType , TDataColumnType ColumnType>
TAttribute< AttributeType > UE::Editor::DataStorage::FAttributeBinder::BindData ( DataType ColumnType::*  InVariable,
TFunction< AttributeType(const DataType &)>  InConverter,
const DataType &  InDefaultValue = DataType() 
)

Bind a specific data member inside a TEDS column to an attribute of a different type than the data by providing a conversion function NOTE: the default value is not the actual attribute type but rather the data type in the column and it gets passed to the conversion function

Parameters
InVariableThe data member inside a column to be bound
InConverterConversion function to convert from DataType -> AttributeType
InDefaultValueThe default value to be used when the column isn't present on a row
Returns
A TAttribute bound to the row, column pair specified

Example: UE::Editor::DataStorage::FAttributeBinder Binder(RowHandle); TAttribute<FText> TestAttribute(Binder.BindData(&FTypedElementLabelColumn::Label), [](const FString& Data) { return FText::FromString(Data); } ));

◆ BindEvent() [1/2]

template<typename InRetValType , typename... ParamTypes, TDynamicColumnTemplate ColumnType>
TDelegate< InRetValType(ParamTypes...)> UE::Editor::DataStorage::FAttributeBinder::BindEvent ( const FName InIdentifier,
TDelegate< InRetValType(ParamTypes...)> ColumnType::*  InVariable 
)

◆ BindEvent() [2/2]

template<typename InRetValType , typename... ParamTypes, TDataColumnType ColumnType>
TDelegate< InRetValType(ParamTypes...)> UE::Editor::DataStorage::FAttributeBinder::BindEvent ( TDelegate< InRetValType(ParamTypes...)> ColumnType::*  InVariable)

Bind a delegate inside a TEDS column to a SLATE_EVENT macro on a widget

Parameters
InVariableThe delegate inside the TEDS column
InIdentifierThe identifier for this column if it is a dynamic column, NAME_None if it is not a dynamic column
Returns
A delegate that can be provided to an event on a slate widget

◆ BindText() [1/4]

template<TDynamicColumnTemplate ColumnType>
TAttribute< FText > UE::Editor::DataStorage::FAttributeBinder::BindText ( const FName InIdentifier,
FName ColumnType::*  InFNameVariable 
)

◆ BindText() [2/4]

template<TDynamicColumnTemplate ColumnType>
TAttribute< FText > UE::Editor::DataStorage::FAttributeBinder::BindText ( const FName InIdentifier,
FString ColumnType::*  InFStringVariable 
)

◆ BindText() [3/4]

template<TDataColumnType ColumnType>
TAttribute< FText > UE::Editor::DataStorage::FAttributeBinder::BindText ( FName ColumnType::*  InFNameVariable)

Directly bind an FName member in a TEDS column to an FText attribute as a shortcut

Parameters
InFNameVariableThe FName variable
InIdentifierThe identifier for this column if it is a dynamic column, NAME_None if it is not a dynamic column
Returns
A delegate that can be provided to a text widget in Slate (e.g STextBlock)

◆ BindText() [4/4]

template<TDataColumnType ColumnType>
TAttribute< FText > UE::Editor::DataStorage::FAttributeBinder::BindText ( FString ColumnType::*  InFStringVariable)

Directly bind an FString member in a TEDS column to an FText attribute as a shortcut

Parameters
InFStringVariableThe FString variable
InIdentifierThe identifier for this column if it is a dynamic column, NAME_None if it is not a dynamic column
Returns
A delegate that can be provided to a text widget in Slate (e.g STextBlock)

◆ BindTextFormat()

FTextAttributeFormatted UE::Editor::DataStorage::FAttributeBinder::BindTextFormat ( FTextFormat  Format) const

Composite a FText attribute using a format string and named arguments bound to TEDS columns. Arguments are passed in using the .Arg(...) function. Each argument starts with the name of the argument in the format string followed by one of the following options:

  • A column variable that's a string (FText, FString or FName).
  • A column variable with a converter to a string.
  • A direct value that's supported by FFormatArgumentValue (FText and numbers). The final parameter for an argument is an optional default that optionally takes a FFormatArgumentValue value.
    Parameters
    FormatThe format to use composite a string together.
    Returns
    A delegate that can be provided to a text widget in Slate (e.g STextBlock)
    Example: TAttribute<FText> Attribute(Binder.BindTextFormat( LOCTEXT("Format", "{Label}: {Value1}, {Value2}, {Value3}, {Value4}") .Arg(TEXT("Label"), &FTypedElementLabelColumn::Label) .Arg(TEXT("Value1"), &FValueColumn::Integer, [](const int32& Value) { return FText::AsNumber(Value); }, 42) .Arg(TEXT("Value2"), &FTextColumn::Text, LOCTEXT("Default", "<no value>")) .Arg(TEXT("Value3"), 42)

The documentation for this class was generated from the following files: