|
Weaponry Assembly System
WAS
|
Templated property override with lazy-evaluated arithmetic operations. More...
#include <PropertyOverrider.h>
Collaboration diagram for TPropertyOverrider< T >:Classes | |
| struct | TOperator |
Public Member Functions | |
| void | ClearDirty () const |
| FORCEINLINE EOperator | GetOperatorExpression () const |
| FORCEINLINE TConstSmall | GetOperatorValue () const |
| T | GetOriginalValue () const |
| TConstSmall | GetValue () const |
| bool | IsDirty () const |
| void | MarkDirty () const |
| operator TConstSmall () const | |
| TConstSmall | operator%= (TConstSmall InValue) |
| TConstSmall | operator* () |
| TConstSmall | operator*= (TConstSmall InValue) |
| TConstSmall | operator+= (TConstSmall InValue) |
| TConstSmall | operator-= (TConstSmall InValue) |
| TConstSmall | operator/= (TConstSmall InValue) |
| TConstSmall | operator= (TConstSmall InValue) |
| void | SetOperatorExpression (EOperator NewOperatorExpression) |
Protected Types | |
| using | TConstSmall |
| using | TSmall |
Static Protected Member Functions | |
| static constexpr uint8 | FirstBitActive () |
| static constexpr uint8 | FirstBitInactive () |
| static constexpr uint8 | GetFirstBitOffset () |
Protected Attributes | |
| T | BaseValue = T() |
| T | CachedValue = T() |
| TOperator | OperatorExpression = EOperator::Ignore |
| T | OperatorValue = 1 |
Templated property override with lazy-evaluated arithmetic operations.
Stores a base value and applies an operator (Add, Subtract, Multiply, Divide, Modulo, Power, Set) lazily. The result is cached and only recalculated when the base value, operator, or operator value changes. This allows modifying properties without conflicting with the weaponry assembly system.
|
protected |
|
protected |
|
inline |
Recalculate cached value from operator expression.
|
inlinestaticconstexprprotected |
Bit mask with dirty flag set.
|
inlinestaticconstexprprotected |
Bit mask with all bits except dirty flag.
|
inlinestaticconstexprprotected |
Highest bit used as dirty flag in TOperator.
|
inline |
Returns current operator type.
|
inline |
Returns the operand for the operator.
|
inline |
Returns the base value without operator applied.
|
inline |
Returns computed result (base value with operator applied).
|
inline |
Returns true if cached value needs recalculation.
|
inline |
Mark cached value as stale requiring recalculation.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets operator and marks cached value as stale.
|
protected |
The original unmodified value.
|
mutableprotected |
Cached result of applying the operator.
|
protected |
Current operator with dirty flag in highest bit.
|
protected |
The operand for the operator expression.