2#include <ossia/network/domain/domain_base_impl.hpp>
8#include <ossia/network/domain/domain_variant_impl.hpp>
24 domain_base_variant v;
29 domain(
const ossia::domain_base<T>& arg)
34 domain(ossia::domain_base<T>&& arg)
38 domain(
const vector_domain& arg)
42 domain(vector_domain&& arg)
46 template <std::
size_t N>
47 domain(
const vecf_domain<N>& arg)
51 template <std::
size_t N>
52 domain(vecf_domain<N>&& arg)
75 value get_min()
const;
76 value get_max()
const;
78 operator bool()
const {
return bool(v); }
79 auto which()
const {
return v.which(); }
82 OSSIA_INLINE T get_min()
const
84 return get_min().get<T>();
87 OSSIA_INLINE T get_max()
const
89 return get_max().get<T>();
93 std::optional<T> maybe_min()
const
96 auto u = val.target<T>();
103 template <
typename T>
104 std::optional<T> maybe_max()
const
106 auto val = get_max();
107 auto u = val.target<T>();
114 template <
typename T>
115 OSSIA_INLINE T convert_min()
const
117 return ossia::convert<T>(get_min());
119 template <
typename T>
120 OSSIA_INLINE T convert_max()
const
122 return ossia::convert<T>(get_max());
135 return d.v == other.v;
140 return d.v != other.v;
143 template <
typename T>
144 friend bool operator==(
const ossia::domain& d,
const T& other)
148 template <
typename T>
149 friend bool operator!=(
const ossia::domain& d,
const T& other)
155template <
typename Functor>
156auto apply(Functor&& functor,
const domain& var) ->
decltype(
auto)
158 return ossia::apply(std::forward<Functor>(functor), var.v);
160template <
typename Functor>
161auto apply(Functor&& functor, domain& var) ->
decltype(
auto)
163 return ossia::apply(std::forward<Functor>(functor), var.v);
165template <
typename Functor>
166auto apply(Functor&& functor, domain&& var) ->
decltype(
auto)
168 return ossia::apply(std::forward<Functor>(functor), std::move(var.v));
170template <
typename Functor>
171auto apply_nonnull(Functor&& functor,
const domain& var) ->
decltype(
auto)
173 return ossia::apply_nonnull(std::forward<Functor>(functor), var.v);
175template <
typename Functor>
176auto apply_nonnull(Functor&& functor, domain& var) ->
decltype(
auto)
178 return ossia::apply_nonnull(std::forward<Functor>(functor), var.v);
180template <
typename Functor>
181auto apply_nonnull(Functor&& functor, domain&& var) ->
decltype(
auto)
183 return ossia::apply_nonnull(std::forward<Functor>(functor), std::move(var.v));
The value class.
Definition value.hpp:173
bounding_mode
Address behaviors at crossing domain boundaries.
Definition parameter_properties.hpp:56
std::string to_pretty_string(const value_with_unit &v)
to_pretty_string Pretty string of unit & value
Definition dataspace_visitors.cpp:242
domain A domain of values
Definition domain_base.hpp:23