Ark Server API (ASA) - Wiki
|
#include <Attribute.h>
Private Member Functions | |
TAttribute (const FGetter &InGetter, bool bExplicitConstructor) | |
Private Attributes | |
ObjectType | Value |
bool | bIsSet |
FGetter | Getter |
Friends | |
template<class OtherType > | |
class | TAttribute |
Attribute object
Definition at line 16 of file Attribute.h.
|
inline |
Default constructor.
Definition at line 32 of file Attribute.h.
|
inline |
Construct implicitly from an initial value
InInitialValue | The value for this attribute |
Definition at line 45 of file Attribute.h.
|
inline |
Construct implicitly from moving an initial value
InInitialValue |
Definition at line 57 of file Attribute.h.
|
inline |
Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
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. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 73 of file Attribute.h.
|
inline |
Constructs by binding an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
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. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 89 of file Attribute.h.
|
inlineprivate |
Special explicit constructor for TAttribute::Create()
Definition at line 443 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InGetter | The delegate object with your function binding |
Definition at line 274 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InGetter | The delegate object with your function binding |
Definition at line 288 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
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. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 347 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
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. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 332 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InUserObject | Instance of the class that contains the member function you want to bind. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 317 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InFuncPtr | Function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 302 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InUserObject | Instance of the class that contains the member function you want to bind. |
InFunctionName | Member function name to bind. |
Definition at line 377 of file Attribute.h.
|
inline |
Binds an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InUserObject | Instance of the class that contains the member function you want to bind. |
InMethodPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 362 of file Attribute.h.
|
inlinestatic |
Static: Creates an attribute that's pre-bound to the specified 'getter' delegate
InGetter | Delegate to bind |
Definition at line 101 of file Attribute.h.
|
inlinestatic |
Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InUserObject | Instance of the class that contains the member function you want to bind. |
InFunctionName | Member function name to bind. |
Definition at line 192 of file Attribute.h.
|
inlinestatic |
Definition at line 199 of file Attribute.h.
|
inlinestatic |
Helper function for creating TAttributes from a lambda TAttribute<float> FloatAttribute = TAttribute<float>::CreateLambda([]{ return 10.f; });
Definition at line 178 of file Attribute.h.
|
inlinestatic |
Helper function for creating TAttributes from a const member function pointer, accessed through a raw pointer
Definition at line 149 of file Attribute.h.
|
inlinestatic |
Helper function for creating TAttributes from a function pointer, accessed through a raw pointer
Definition at line 140 of file Attribute.h.
|
inlinestatic |
Helper function for creating TAttributes from a const member function pointer, accessed through a weak pointer to the shared object
Definition at line 168 of file Attribute.h.
|
inlinestatic |
Helper function for creating TAttributes from a non-const member function pointer, accessed through a weak pointer to the shared object
Definition at line 159 of file Attribute.h.
|
inlinestatic |
Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InFuncPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 129 of file Attribute.h.
|
inlinestatic |
Creates an attribute by binding an arbitrary function that will be called to generate this attribute's value on demand. After binding, the attribute will no longer have a value that can be accessed directly, and instead the bound function will always be called to generate the value.
InFuncPtr | Member function to bind. The function's structure (return value, arguments, etc) must match IBoundAttributeDelegate's definition. |
Definition at line 115 of file Attribute.h.
TAttribute< ObjectType >::DECLARE_DELEGATE_RetVal | ( | ObjectType | , |
FGetter | ) |
Attribute 'getter' delegate
ObjectType GetValue() const
|
inline |
Gets the attribute's current value. Assumes that the attribute is set.
Definition at line 241 of file Attribute.h.
|
inline |
Gets the attribute's current value. The attribute may not be set, in which case use the default value provided. Shorthand for the boilerplate code: MyAttribute.IsSet() ? MyAttribute.Get() : DefaultValue
Definition at line 262 of file Attribute.h.
|
inline |
Gets the attribute's 'getter' which can be bound or unbound
Definition at line 398 of file Attribute.h.
|
inline |
Is this attribute identical to another TAttribute.
InOther | The other attribute to compare with. |
Definition at line 421 of file Attribute.h.
|
inline |
Checks to see if this attribute has a 'getter' function bound
Definition at line 388 of file Attribute.h.
|
inline |
Was this TAttribute ever assigned?
Definition at line 230 of file Attribute.h.
|
inline |
Sets the attribute's value
InNewValue | The value to set the attribute to |
Definition at line 210 of file Attribute.h.
|
inline |
Sets the attribute's value
InNewValue | The value to set the attribute to |
Definition at line 222 of file Attribute.h.
|
inline |
Move the attribute's 'getter' or the attribute's Value
and reset the attribute. The attribute needs to be set.
Value
Definition at line 408 of file Attribute.h.
Definition at line 450 of file Attribute.h.
|
private |
true when this attribute was explicitly set by a consumer, false when the attribute's value is set to the default
Definition at line 456 of file Attribute.h.
|
private |
Bound member function for this attribute (may be NULL if no function is bound.) When set, all attempts to read the attribute's value will instead call this delegate to generate the value. Our attribute's 'getter' delegate
Definition at line 461 of file Attribute.h.
|
mutableprivate |
Current value. Mutable so that we can cache the value locally when using a bound Getter (allows const ref return value.)
Definition at line 453 of file Attribute.h.