CatapultServer
v0.5.0.1 (Elephant)
|
Base values that are constrained to a range of values. More...
Public Types | |
using | Unclamped = typename Traits::UnclampedType |
Compatible unclamped type. More... | |
Public Types inherited from catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue > | |
using | ValueType = TValue |
Raw value type. More... | |
Public Member Functions | |
constexpr | ClampedBaseValue (TValue value=TRange::Default_Value) |
Creates a clamped base value from a raw value. More... | |
constexpr ClampedBaseValue | operator+ (Unclamped rhs) const |
Adds rhs and this value and returns a new value. More... | |
constexpr Unclamped | operator- (ClampedBaseValue rhs) const |
Subtracts rhs from this value and returns a new value. More... | |
Public Member Functions inherited from catapult::utils::BasicBaseValue< TValue, TTag, TBaseValue > | |
constexpr | BasicBaseValue (TValue value) |
Creates a basic base value from a raw value. More... | |
constexpr | BasicBaseValue (const BasicBaseValue &rhs) |
Creates a copy of rhs. More... | |
BasicBaseValue & | operator= (BasicBaseValue rhs) |
Assigns rhs to this. More... | |
constexpr ValueType | unwrap () const |
Unwraps this value and returns the underlying raw value. More... | |
constexpr bool | operator== (TBaseValue rhs) const |
Returns true if this value is equal to rhs. More... | |
constexpr bool | operator!= (TBaseValue rhs) const |
Returns true if this value is not equal to rhs. More... | |
constexpr bool | operator>= (TBaseValue rhs) const |
Returns true if this value is greater than or equal to rhs. More... | |
constexpr bool | operator> (TBaseValue rhs) const |
Returns true if this value is greater than rhs. More... | |
constexpr bool | operator<= (TBaseValue rhs) const |
Returns true if this value is less than or equal to rhs. More... | |
constexpr bool | operator< (TBaseValue rhs) const |
Returns true if this value is less than rhs. More... | |
Static Public Member Functions | |
static constexpr ClampedBaseValue | Min () |
static constexpr ClampedBaseValue | Max () |
Private Types | |
using | Traits = detail::ClampedBaseValueTraits< TValue, TRange > |
Static Private Member Functions | |
static constexpr TValue | Clamp (TValue value) |
Base values that are constrained to a range of values.
|
private |
using catapult::utils::ClampedBaseValue< TValue, TRange >::Unclamped = typename Traits::UnclampedType |
Compatible unclamped type.
|
inlineexplicitconstexpr |
Creates a clamped base value from a raw value.
|
inlinestaticconstexprprivate |
|
inlinestaticconstexpr |
Gets the maximum clamped value.
|
inlinestaticconstexpr |
Gets the minimum clamped value.
|
inlineconstexpr |
Adds rhs and this value and returns a new value.
|
inlineconstexpr |
Subtracts rhs from this value and returns a new value.