GGUI::GGValue struct

A typed value handed to code outside the UI (FieldSource::SetValue).

Public static functions

template<ValueType T>
static auto Of(T value) -> GGValue
value, typed.

Public functions

auto Kind() const -> ValueKind
Its type; Float if it has none.
template<ValueType T>
auto As() const -> T
T must match the stored type (check with Is<T>()).
template<ValueType T>
auto Is() const -> bool
Whether it holds a T.
auto AsDouble() const -> double
Lossy. For sources that keep their numbers as float or double.

Public variables

const ValueOps* Ops
its type's operations; null: none
ValueBits Bits
the value