Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
Attribute.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
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"
11
12/**
13 * Attribute object
14 */
15template< typename ObjectType >
17{
18
19public:
20
21 /**
22 * Attribute 'getter' delegate
23 *
24 * ObjectType GetValue() const
25 *
26 * @return The attribute's value
27 */
28 DECLARE_DELEGATE_RetVal( ObjectType, FGetter );
29
30
31 /** Default constructor. */
33 : Value() // NOTE: Potentially uninitialized for atomics!!
34 , bIsSet(false)
35 , Getter()
36 {
37 }
38
39 /**
40 * Construct implicitly from an initial value
41 *
42 * @param InInitialValue The value for this attribute
43 */
44 template< typename OtherType >
45 TAttribute( const OtherType& InInitialValue )
46 : Value( static_cast<ObjectType>(InInitialValue) )
47 , bIsSet(true)
48 , Getter()
49 {
50 }
51
52 /**
53 * Construct implicitly from moving an initial value
54 *
55 * @param InInitialValue
56 */
57 TAttribute( ObjectType&& InInitialValue)
59 , bIsSet(true)
60 , Getter()
61 {
62 }
63
64 /**
65 * Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand.
66 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
67 * function will always be called to generate the value.
68 *
69 * @param InUserObject Shared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
70 * @param InMethodPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
71 */
72 template< class SourceType >
73 TAttribute( TSharedRef< SourceType > InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr )
74 : Value()
75 , bIsSet(true)
77 {
78 }
79
80 /**
81 * Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand.
82 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
83 * function will always be called to generate the value.
84 *
85 * @param InUserObject Shared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
86 * @param InMethodPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
87 */
88 template< class SourceType >
89 TAttribute( SourceType* InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr )
90 : Value()
91 , bIsSet(true)
93 {
94 }
95
96 /**
97 * Static: Creates an attribute that's pre-bound to the specified 'getter' delegate
98 *
99 * @param InGetter Delegate to bind
100 */
101 UE_NODISCARD static TAttribute Create( const FGetter& InGetter )
102 {
103 const bool bExplicitConstructor = true;
105 }
106
107 /**
108 * Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand.
109 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
110 * function will always be called to generate the value.
111 *
112 * @param InFuncPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
113 */
114 template <typename... VarTypes >
115 UE_NODISCARD static TAttribute CreateStatic( TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars )
116 {
117 const bool bExplicitConstructor = true;
119 }
120
121 /**
122 * Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand.
123 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
124 * function will always be called to generate the value.
125 *
126 * @param InFuncPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
127 */
128 template <typename FuncPtrType, typename... VarTypes >
129 UE_NODISCARD static TAttribute CreateStatic(FuncPtrType&& InFuncPtr, VarTypes... Vars)
130 {
131 const bool bExplicitConstructor = true;
133 }
134
135 /**
136 * Helper function for creating TAttributes from a function pointer, accessed through a raw pointer
137 */
138 template<typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
139 UE_DEPRECATED(5.0, "Attribute's Getter should be const.")
140 UE_NODISCARD FORCEINLINE static TAttribute CreateRaw(SourceType* InObject, ObjectType (SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay<PayloadTypes>::Type... InputPayload)
141 {
143 }
144
145 /**
146 * Helper function for creating TAttributes from a const member function pointer, accessed through a raw pointer
147 */
148 template<typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
149 UE_NODISCARD FORCEINLINE static TAttribute CreateRaw(const SourceType* InObject, ObjectType (SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay<PayloadTypes>::Type... InputPayload)
150 {
152 }
153
154 /**
155 * Helper function for creating TAttributes from a non-const member function pointer, accessed through a weak pointer to the shared object
156 */
157 template<typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
158 UE_DEPRECATED(5.0, "Attribute's Getter should be const.")
159 UE_NODISCARD FORCEINLINE static TAttribute CreateSP(SourceType* InObject, ObjectType (SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay<PayloadTypes>::Type... InputPayload)
160 {
162 }
163
164 /**
165 * Helper function for creating TAttributes from a const member function pointer, accessed through a weak pointer to the shared object
166 */
167 template<typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
168 UE_NODISCARD FORCEINLINE static TAttribute CreateSP(const SourceType* InObject, ObjectType (SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay<PayloadTypes>::Type... InputPayload)
169 {
171 }
172
173 /**
174 * Helper function for creating TAttributes from a lambda
175 * TAttribute<float> FloatAttribute = TAttribute<float>::CreateLambda([]{ return 10.f; });
176 */
177 template<typename LambdaType, typename... PayloadTypes>
178 UE_NODISCARD FORCEINLINE static TAttribute CreateLambda(LambdaType&& InCallable, PayloadTypes&&... InputPayload)
179 {
181 }
182
183 /**
184 * Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand.
185 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
186 * function will always be called to generate the value.
187 *
188 * @param InUserObject Instance of the class that contains the member function you want to bind.
189 * @param InFunctionName Member function name to bind.
190 */
191 template< class SourceType >
192 UE_NODISCARD static TAttribute< ObjectType > Create(SourceType* InUserObject, const FName& InFunctionName)
193 {
196 return Attrib;
197 }
198
199 UE_NODISCARD FORCEINLINE static TAttribute< ObjectType > Create(TFunction<ObjectType(void)>&& InLambda)
200 {
202 }
203
204 /**
205 * Sets the attribute's value
206 *
207 * @param InNewValue The value to set the attribute to
208 */
209 template< typename OtherType >
210 void Set( const OtherType& InNewValue )
211 {
212 Getter.Unbind();
214 bIsSet = true;
215 }
216
217 /**
218 * Sets the attribute's value
219 *
220 * @param InNewValue The value to set the attribute to
221 */
222 void Set( ObjectType&& InNewValue )
223 {
224 Getter.Unbind();
226 bIsSet = true;
227 }
228
229 /** Was this TAttribute ever assigned? */
230 bool IsSet() const
231 {
232 return bIsSet;
233 }
234
235 /**
236 * Gets the attribute's current value.
237 * Assumes that the attribute is set.
238 *
239 * @return The attribute's value
240 */
241 const ObjectType& Get() const
242 {
243 // If we have a getter delegate, then we'll call that to generate the value
244 if( Getter.IsBound() )
245 {
246 // Call the delegate to get the value. Note that this will assert if the delegate is not currently
247 // safe to call (e.g. object was deleted and we could detect that)
248
249 // NOTE: We purposely overwrite our value copy here so that we can return the value by address in
250 // the most common case, which is an attribute that doesn't have a delegate bound to it at all.
251 Value = Getter.Execute();
252 }
253
254 // Return the stored value
255 return Value;
256 }
257
258 /**
259 * Gets the attribute's current value. The attribute may not be set, in which case use the default value provided.
260 * Shorthand for the boilerplate code: MyAttribute.IsSet() ? MyAttribute.Get() : DefaultValue
261 */
262 const ObjectType& Get( const ObjectType& DefaultValue ) const
263 {
264 return bIsSet ? Get() : DefaultValue;
265 }
266
267 /**
268 * Binds an arbitrary function that will be called to generate this attribute's value on demand. After
269 * binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
270 * function will always be called to generate the value.
271 *
272 * @param InGetter The delegate object with your function binding
273 */
274 void Bind( const FGetter& InGetter )
275 {
276 bIsSet = true;
278 }
279
280
281 /**
282 * Binds an arbitrary function that will be called to generate this attribute's value on demand. After
283 * binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
284 * function will always be called to generate the value.
285 *
286 * @param InGetter The delegate object with your function binding
287 */
288 void Bind( FGetter&& InGetter )
289 {
290 bIsSet = true;
292 }
293
294 /**
295 * Binds an arbitrary function that will be called to generate this attribute's value on demand.
296 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
297 * function will always be called to generate the value.
298 *
299 * @param InFuncPtr Function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
300 */
301 template < typename... VarTypes >
302 void BindStatic( TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars )
303 {
304 bIsSet = true;
306 }
307
308 /**
309 * Binds an arbitrary function that will be called to generate this attribute's value on demand.
310 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
311 * function will always be called to generate the value.
312 *
313 * @param InUserObject Instance of the class that contains the member function you want to bind.
314 * @param InMethodPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
315 */
316 template< class SourceType >
317 void BindRaw( SourceType* InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr )
318 {
319 bIsSet = true;
321 }
322
323 /**
324 * Binds an arbitrary function that will be called to generate this attribute's value on demand.
325 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
326 * function will always be called to generate the value.
327 *
328 * @param InUserObject Shared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
329 * @param InMethodPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
330 */
331 template< class SourceType >
332 void Bind( TSharedRef< SourceType > InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr )
333 {
334 bIsSet = true;
336 }
337
338 /**
339 * Binds an arbitrary function that will be called to generate this attribute's value on demand.
340 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
341 * function will always be called to generate the value.
342 *
343 * @param InUserObject Shared Pointer to the instance of the class that contains the member function you want to bind. The attribute will only retain a weak pointer to this class.
344 * @param InMethodPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
345 */
346 template< class SourceType >
347 void Bind( SourceType* InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr )
348 {
349 bIsSet = true;
351 }
352
353 /**
354 * Binds an arbitrary function that will be called to generate this attribute's value on demand.
355 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
356 * function will always be called to generate the value.
357 *
358 * @param InUserObject Instance of the class that contains the member function you want to bind.
359 * @param InMethodPtr Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition.
360 */
361 template< class SourceType >
362 void BindUObject( SourceType* InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr )
363 {
364 bIsSet = true;
366 }
367
368 /**
369 * Binds an arbitrary function that will be called to generate this attribute's value on demand.
370 * After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound
371 * function will always be called to generate the value.
372 *
373 * @param InUserObject Instance of the class that contains the member function you want to bind.
374 * @param InFunctionName Member function name to bind.
375 */
376 template< class SourceType >
377 void BindUFunction( SourceType* InUserObject, const FName& InFunctionName )
378 {
379 bIsSet = true;
381 }
382
383 /**
384 * Checks to see if this attribute has a 'getter' function bound
385 *
386 * @return True if attribute is bound to a getter function
387 */
388 bool IsBound() const
389 {
390 return Getter.IsBound();
391 }
392
393 /**
394 * Gets the attribute's 'getter' which can be bound or unbound
395 *
396 * @return The attribute's FGetter.
397 */
398 UE_NODISCARD const FGetter& GetBinding() const
399 {
400 return Getter;
401 }
402
403 /**
404 * Move the attribute's 'getter' or the attribute's `Value` and reset the attribute. The attribute needs to be set.
405 *
406 * @return The attribute's FGetter or `Value`
407 */
408 UE_NODISCARD TVariant<ObjectType, FGetter> Steal()
409 {
410 checkf(IsSet(), TEXT("It is an error to call Steal() on an unset TAttribute. Check IsSet() before calling Steal()."));
411 bIsSet = false;
413 }
414
415 /**
416 * Is this attribute identical to another TAttribute.
417 *
418 * @param InOther The other attribute to compare with.
419 * @return true if the attributes are identical, false otherwise.
420 */
421 bool IdenticalTo(const TAttribute& InOther) const
422 {
423 const bool bIsBound = IsBound();
424
425 if ( bIsBound == InOther.IsBound() )
426 {
427 if ( bIsBound )
428 {
430 }
431 else
432 {
433 return IsSet() == InOther.IsSet() && Value == InOther.Value;
434 }
435 }
436
437 return false;
438 }
439
440private:
441
442 /** Special explicit constructor for TAttribute::Create() */
443 TAttribute( const FGetter& InGetter, bool bExplicitConstructor )
444 : Value()
445 , bIsSet( true )
447 { }
448
449 // We declare ourselves as a friend (templated using OtherType) so we can access members as needed
450 template< class OtherType > friend class TAttribute;
451
452 /** Current value. Mutable so that we can cache the value locally when using a bound Getter (allows const ref return value.) */
453 mutable ObjectType Value;
454
455 /** true when this attribute was explicitly set by a consumer, false when the attribute's value is set to the default*/
456 bool bIsSet;
457
458 /** Bound member function for this attribute (may be NULL if no function is bound.) When set, all attempts
459 to read the attribute's value will instead call this delegate to generate the value. */
460 /** Our attribute's 'getter' delegate */
461 FGetter Getter;
462};
463
464/**
465 * Helper function for creating TAttributes from a non-const member function pointer, accessed through a raw pointer
466 */
467template<typename T, typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
468UE_DEPRECATED(5.0, "Attribute's Getter should be const.")
469UE_NODISCARD FORCEINLINE TAttribute<T> MakeAttributeRaw(SourceType* InObject, T (SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay<PayloadTypes>::Type... InputPayload)
470{
471 return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateRaw(InObject, InMethod, MoveTemp(InputPayload)...));
472}
473
474/**
475 * Helper function for creating TAttributes from a const member function pointer, accessed through a raw pointer
476 */
477template<typename T, typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
478UE_NODISCARD FORCEINLINE TAttribute<T> MakeAttributeRaw(const SourceType* InObject, T (SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay<PayloadTypes>::Type... InputPayload)
479{
480 return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateRaw(InObject, InMethod, MoveTemp(InputPayload)...));
481}
482
483/**
484 * Helper function for creating TAttributes from a non-const member function pointer, accessed through a weak pointer to the shared object
485 */
486template<typename T, typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
487UE_DEPRECATED(5.0, "Attribute's Getter should be const.")
488UE_NODISCARD FORCEINLINE TAttribute<T> MakeAttributeSP(SourceType* InObject, T (SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay<PayloadTypes>::Type... InputPayload)
489{
490 return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateSP(InObject, InMethod, MoveTemp(InputPayload)...));
491}
492
493/**
494 * Helper function for creating TAttributes from a const member function pointer, accessed through a weak pointer to the shared object
495 */
496template<typename T, typename SourceType, typename SourceTypeOrBase, typename... PayloadTypes>
497UE_NODISCARD FORCEINLINE TAttribute<T> MakeAttributeSP(const SourceType* InObject, T (SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay<PayloadTypes>::Type... InputPayload)
498{
499 return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateSP(InObject, InMethod, MoveTemp(InputPayload)...));
500}
501
502/**
503 * Helper function for creating TAttributes from a lambda
504 * TAttribute<float> FloatAttribute = MakeAttributeLambda([]{ return 10.f; });
505 */
506template<typename LambdaType, typename... PayloadTypes>
507UE_NODISCARD decltype(auto) MakeAttributeLambda(LambdaType&& InCallable, PayloadTypes&&... InputPayload)
508{
509 typedef decltype(InCallable(DeclVal<PayloadTypes>()...)) T;
510
511 return TAttribute<T>::Create(TAttribute<T>::FGetter::CreateLambda(InCallable, Forward<PayloadTypes>(InputPayload)...));
512}
#define checkf(expr, format,...)
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeSP(SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:488
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeSP(const SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:497
UE_NODISCARD decltype(auto) MakeAttributeLambda(LambdaType &&InCallable, PayloadTypes &&... InputPayload)
Definition Attribute.h:507
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeRaw(const SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:478
UE_NODISCARD FORCEINLINE TAttribute< T > MakeAttributeRaw(SourceType *InObject, T(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:469
#define UE_DEPRECATED(Version, Message)
#define DECLARE_DELEGATE_RetVal(ReturnValueType, DelegateName)
#define FORCEINLINE
Definition Platform.h:644
#define UE_NODISCARD
Definition Platform.h:660
void Bind(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
Definition Attribute.h:347
const ObjectType & Get() const
Definition Attribute.h:241
TAttribute(ObjectType &&InInitialValue)
Definition Attribute.h:57
FGetter Getter
Definition Attribute.h:461
bool IsSet() const
Definition Attribute.h:230
static UE_NODISCARD TAttribute CreateStatic(FuncPtrType &&InFuncPtr, VarTypes... Vars)
Definition Attribute.h:129
bool bIsSet
Definition Attribute.h:456
UE_NODISCARD TVariant< ObjectType, FGetter > Steal()
Definition Attribute.h:408
void Bind(TSharedRef< SourceType > InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
Definition Attribute.h:332
TAttribute(const FGetter &InGetter, bool bExplicitConstructor)
Definition Attribute.h:443
void Bind(const FGetter &InGetter)
Definition Attribute.h:274
void Bind(FGetter &&InGetter)
Definition Attribute.h:288
static UE_NODISCARD TAttribute CreateStatic(TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars)
Definition Attribute.h:115
TAttribute(const OtherType &InInitialValue)
Definition Attribute.h:45
UE_NODISCARD static FORCEINLINE TAttribute< ObjectType > Create(TFunction< ObjectType(void)> &&InLambda)
Definition Attribute.h:199
void BindUFunction(SourceType *InUserObject, const FName &InFunctionName)
Definition Attribute.h:377
UE_NODISCARD static FORCEINLINE TAttribute CreateSP(const SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:168
const ObjectType & Get(const ObjectType &DefaultValue) const
Definition Attribute.h:262
TAttribute(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
Definition Attribute.h:89
void Set(const OtherType &InNewValue)
Definition Attribute.h:210
UE_NODISCARD static FORCEINLINE TAttribute CreateLambda(LambdaType &&InCallable, PayloadTypes &&... InputPayload)
Definition Attribute.h:178
void BindUObject(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
Definition Attribute.h:362
ObjectType Value
Definition Attribute.h:453
UE_NODISCARD const FGetter & GetBinding() const
Definition Attribute.h:398
void BindStatic(TIdentity_T< typename FGetter::template TFuncPtr< VarTypes... > > InFuncPtr, VarTypes... Vars)
Definition Attribute.h:302
static UE_NODISCARD TAttribute< ObjectType > Create(SourceType *InUserObject, const FName &InFunctionName)
Definition Attribute.h:192
UE_NODISCARD static FORCEINLINE TAttribute CreateRaw(SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:140
TAttribute(TSharedRef< SourceType > InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
Definition Attribute.h:73
UE_NODISCARD static FORCEINLINE TAttribute CreateSP(SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...), typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:159
void Set(ObjectType &&InNewValue)
Definition Attribute.h:222
UE_NODISCARD static FORCEINLINE TAttribute CreateRaw(const SourceType *InObject, ObjectType(SourceTypeOrBase::*InMethod)(PayloadTypes...) const, typename TDecay< PayloadTypes >::Type... InputPayload)
Definition Attribute.h:149
static UE_NODISCARD TAttribute Create(const FGetter &InGetter)
Definition Attribute.h:101
bool IsBound() const
Definition Attribute.h:388
bool IdenticalTo(const TAttribute &InOther) const
Definition Attribute.h:421
void BindRaw(SourceType *InUserObject, typename FGetter::template TConstMethodPtr< SourceType > InMethodPtr)
Definition Attribute.h:317
Definition Decay.h:44