|
Sygaldry
|
A numeric endpoint with user customizeable range and occasional value semantics. More...
Additional Inherited Members | |
Public Types inherited from sygaldry::occasional< T > | |
| using | type = T |
| The underlying type. | |
Public Member Functions inherited from sygaldry::occasional< T > | |
| constexpr | occasional () noexcept |
Default constructor; state is default initialized and updated is false. | |
| constexpr | occasional (occasional< T > &&other) |
Move constructor from another occasional. | |
| constexpr | occasional (const occasional< T > &other) |
Copy constructor from another occasional. | |
| constexpr auto & | operator= (occasional< T > &&other) |
Move assignment from another occasional. | |
| constexpr auto & | operator= (const occasional< T > &other) |
Copy assignment from another occasional. | |
| constexpr | operator T& () noexcept |
| Mutable value access. | |
| constexpr | operator const T & () const noexcept |
| Immutable value access. | |
| constexpr | occasional (T &&t) noexcept |
| Move constructor from the underlying type. | |
| constexpr | occasional (const T &t) noexcept |
| Copy constructor from the underlying type. | |
| constexpr auto & | operator= (T &&t) noexcept |
| Move assignment from the underlying type. | |
| constexpr auto & | operator= (const T &t) noexcept |
| Copy assignment from the underlying type. | |
| constexpr T & | operator* () noexcept |
| Mutable dereference operator; provides access to the underlying state. | |
| constexpr const T & | operator* () const noexcept |
| Constant dereference operator; provides access to the underlying state. | |
| constexpr T * | operator-> () noexcept |
| Mutable member access operator; provides access to the members of the underlying state. | |
| constexpr const T * | operator-> () const noexcept |
| Constant member access operator; provides access to the members of the underlying state. | |
| constexpr T & | value () noexcept |
| Mutable value access. | |
| constexpr const T & | value () const noexcept |
| Immutable value access. | |
| constexpr void | reset () noexcept |
Clear the updated flag. This can also be achieved by assignment from empty braces, e.g. x = {}; | |
Static Public Member Functions inherited from sygaldry::name_< name_str > | |
| static _consteval auto | name () |
Static Public Member Functions inherited from sygaldry::description_< str > | |
| static _consteval auto | description () |
Static Public Member Functions inherited from sygaldry::range_< _min, _max, _init > | |
| static _consteval auto | range () |
Returns a struct with min, max, and init members containing the range. | |
| static _consteval auto | min () |
| Returns the minimum value of the range. | |
| static _consteval auto | max () |
| Returns the maximum value of the range. | |
| static _consteval auto | init () |
| Returns the initial value of the range. | |
Public Attributes inherited from sygaldry::occasional< T > | |
| T | state |
| The wrapped state. | |
| bool | updated |
| Flag indicating if the state has been changed. | |
A numeric endpoint with user customizeable range and occasional value semantics.
Example: slider_message<"pressure", "Current reading from the pressure sensor"> pressure;
| name_str | The name of the endpoint. Required. |
| desc | A description of the endpoint. Defaults to an empty string. |
| T | Underlying value type of the endpoint. Defaults to float. |
| min | Expected minimum value of the endpoint. Defaults to 0.0f. |
| max | Expected maximum value of the endpoint. Defaults to 1.0f. |
| init | The initial value of the endpoint. Defaults to min. |
| Tags | Tag helper classes to apply to the endpoint. None by default. |