6#include "Misc/TVariant.h" 
    7#include "Templates/Function.h" 
    8#include "Templates/Identity.h" 
    9#include "Templates/SharedPointer.h" 
   10#include "Delegates/Delegate.h" 
   13
   14
   15template< 
typename ObjectType >
 
   22
   23
   24
   25
   26
   27
   40
   41
   42
   43
   44    template< 
typename OtherType >
 
   53
   54
   55
   56
   65
   66
   67
   68
   69
   70
   71
   72    template< 
class SourceType >
 
   73    TAttribute( TSharedRef< SourceType > InUserObject, 
typename FGetter::
template TConstMethodPtr< SourceType > InMethodPtr )
 
   81
   82
   83
   84
   85
   86
   87
   88    template< 
class SourceType >
 
   89    TAttribute( SourceType* InUserObject, 
typename FGetter::
template TConstMethodPtr< SourceType > InMethodPtr )
 
   97
   98
   99
  100
  108
  109
  110
  111
  112
  113
  114    template <
typename... VarTypes >
 
  122
  123
  124
  125
  126
  127
  128    template <
typename FuncPtrType, 
typename... VarTypes >
 
  136
  137
  138    template<
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  146
  147
  148    template<
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  155
  156
  157    template<
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  165
  166
  167    template<
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  174
  175
  176
  177    template<
typename LambdaType, 
typename... PayloadTypes>
 
  184
  185
  186
  187
  188
  189
  190
  191    template< 
class SourceType >
 
  205
  206
  207
  208
  209    template< 
typename OtherType >
 
  210    void Set( 
const OtherType& InNewValue )
 
  218
  219
  220
  221
  222    void Set( ObjectType&& InNewValue )
 
  236
  237
  238
  239
  240
  241    const ObjectType& 
Get() 
const 
  259
  260
  261
  262    const ObjectType& 
Get( 
const ObjectType& DefaultValue ) 
const 
  268
  269
  270
  271
  272
  273
  274    void Bind( 
const FGetter& InGetter )
 
  282
  283
  284
  285
  286
  287
  288    void Bind( FGetter&& InGetter )
 
  295
  296
  297
  298
  299
  300
  301    template < 
typename... VarTypes >
 
  302    void BindStatic( TIdentity_T< 
typename FGetter::
template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars )
 
  309
  310
  311
  312
  313
  314
  315
  316    template< 
class SourceType >
 
  317    void BindRaw( SourceType* InUserObject, 
typename FGetter::
template TConstMethodPtr< SourceType > InMethodPtr )
 
  324
  325
  326
  327
  328
  329
  330
  331    template< 
class SourceType >
 
  332    void Bind( TSharedRef< SourceType > InUserObject, 
typename FGetter::
template TConstMethodPtr< SourceType > InMethodPtr )
 
  339
  340
  341
  342
  343
  344
  345
  346    template< 
class SourceType >
 
  347    void Bind( SourceType* InUserObject, 
typename FGetter::
template TConstMethodPtr< SourceType > InMethodPtr )
 
  354
  355
  356
  357
  358
  359
  360
  361    template< 
class SourceType >
 
  362    void BindUObject( SourceType* InUserObject, 
typename FGetter::
template TConstMethodPtr< SourceType > InMethodPtr )
 
  369
  370
  371
  372
  373
  374
  375
  376    template< 
class SourceType >
 
  384
  385
  386
  387
  394
  395
  396
  397
  404
  405
  406
  407
  410        checkf(
IsSet(), TEXT(
"It is an error to call Steal() on an unset TAttribute. Check IsSet() before calling Steal()."));
 
  416
  417
  418
  419
  420
  443    TAttribute( 
const FGetter& InGetter, 
bool bExplicitConstructor )
 
  459
  465
  466
  467template<
typename T, 
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  471    return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateRaw(InObject, InMethod, MoveTemp(InputPayload)...));
 
  475
  476
  477template<
typename T, 
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  480    return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateRaw(InObject, InMethod, MoveTemp(InputPayload)...));
 
  484
  485
  486template<
typename T, 
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  490    return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateSP(InObject, InMethod, MoveTemp(InputPayload)...));
 
  494
  495
  496template<
typename T, 
typename SourceType, 
typename SourceTypeOrBase, 
typename... PayloadTypes>
 
  499    return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateSP(InObject, InMethod, MoveTemp(InputPayload)...));
 
  503
  504
  505
  506template<
typename LambdaType, 
typename... PayloadTypes>
 
  509    typedef decltype(InCallable(DeclVal<PayloadTypes>()...)) T;
 
  511    return TAttribute<T>::Create(
TAttribute<T>::FGetter::CreateLambda(InCallable, Forward<PayloadTypes>(InputPayload)...));
 
#define checkf(expr, format,...)
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeSP(SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeSP(const SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
UE_NODISCARD decltype(auto) MakeAttributeLambda(LambdaType &&InCallable, PayloadTypes &&... InputPayload)
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeRaw(const SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeRaw(SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
#define UE_DEPRECATED(Version, Message)
#define DECLARE_DELEGATE_RetVal(ReturnValueType, DelegateName)
void Bind(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
const ObjectType & Get() const
TAttribute(ObjectType &&InInitialValue)
static UE_NODISCARD TAttribute CreateStatic(FuncPtrType &&InFuncPtr, VarTypes... Vars)
UE_NODISCARD TVariant< ObjectType, FGetter > Steal()
void Bind(TSharedRef< SourceType > InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
TAttribute(const FGetter &InGetter, bool bExplicitConstructor)
void Bind(const FGetter &InGetter)
void Bind(FGetter &&InGetter)
static UE_NODISCARD TAttribute CreateStatic(TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars)
TAttribute(const OtherType &InInitialValue)
UE_NODISCARD static FORCEINLINE TAttribute< ObjectType > Create(TFunction< ObjectType(void)> &&InLambda)
void BindUFunction(SourceType *InUserObject, const FName &InFunctionName)
UE_NODISCARD static FORCEINLINE TAttribute CreateSP(const SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
const ObjectType & Get(const ObjectType &DefaultValue) const
TAttribute(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
void Set(const OtherType &InNewValue)
UE_NODISCARD static FORCEINLINE TAttribute CreateLambda(LambdaType &&InCallable, PayloadTypes &&... InputPayload)
void BindUObject(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
UE_NODISCARD const FGetter & GetBinding() const
void BindStatic(TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars)
static UE_NODISCARD TAttribute< ObjectType > Create(SourceType *InUserObject, const FName &InFunctionName)
UE_NODISCARD static FORCEINLINE TAttribute CreateRaw(SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
TAttribute(TSharedRef< SourceType > InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
UE_NODISCARD static FORCEINLINE TAttribute CreateSP(SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
void Set(ObjectType &&InNewValue)
UE_NODISCARD static FORCEINLINE TAttribute CreateRaw(const SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
static UE_NODISCARD TAttribute Create(const FGetter &InGetter)
bool IdenticalTo(const TAttribute &InOther) const
void BindRaw(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)