2#include <ossia/network/domain/detail/array_domain.hpp>
3#include <ossia/network/domain/detail/generic_domain.hpp>
4#include <ossia/network/domain/detail/numeric_domain.hpp>
5#include <ossia/network/domain/detail/value_set_domain.hpp>
9#if defined(FAST_COMPILES)
22constexpr typename std::remove_reference<T>::type&& move(T&& t)
noexcept
24 return static_cast<typename std::remove_reference<T>::type&&
>(t);
32struct apply_domain_visitor
37 template <
typename T,
typename U>
38 OSSIA_INLINE
ossia::value operator()(
const T& value,
const U& bad_domain)
const
46 operator()(T&& value,
const domain_base<ossia::value>& domain)
const
48 return generic_clamp{domain}(b, std::move(value));
53 operator()(
const T& value,
const domain_base<ossia::value>& domain)
const
55 return generic_clamp{domain}(b, value);
60 operator()(impulse value,
const domain_base<impulse>& domain)
const
65 ossia::value operator()(int32_t value,
const domain_base<int32_t>& domain)
const;
66 ossia::value operator()(int32_t value,
const domain_base<float>& domain)
const;
67 ossia::value operator()(
float value,
const domain_base<int32_t>& domain)
const;
68 ossia::value operator()(
float value,
const domain_base<float>& domain)
const;
69 ossia::value operator()(
bool value,
const domain_base<bool>& domain)
const;
73 operator()(
const std::string& value,
const domain_base<std::string>& domain)
const
75 return value_set_clamp<domain_base<std::string>>{domain}(b, value);
78 operator()(std::string&& value,
const domain_base<std::string>& domain)
const
80 return value_set_clamp<domain_base<std::string>>{domain}(b, std::move(value));
89 operator()(
const std::vector<ossia::value>& value,
const domain_base<T>& domain)
const;
92 operator()(std::vector<ossia::value>&& value,
const domain_base<T>& domain)
const;
95 const std::vector<ossia::value>& value,
96 const domain_base<ossia::value>& domain)
const;
98 std::vector<ossia::value>&& value,
const domain_base<ossia::value>& domain)
const;
102 operator()(
const std::vector<ossia::value>& value,
const vector_domain& domain)
const;
104 operator()(std::vector<ossia::value>&& value,
const vector_domain& domain)
const;
108 operator()(
const std::array<float, 2>& value,
const domain_base<float>& domain)
const;
110 const std::array<float, 2>& value,
const domain_base<int32_t>& domain)
const;
112 operator()(
const std::array<float, 2>& value,
const domain_base<bool>& domain)
const;
114 operator()(
const std::array<float, 2>& value,
const vecf_domain<2>& domain)
const;
116 operator()(
const std::array<float, 2>& value,
const vector_domain& domain)
const;
119 operator()(
const std::array<float, 3>& value,
const domain_base<float>& domain)
const;
121 const std::array<float, 3>& value,
const domain_base<int32_t>& domain)
const;
123 operator()(
const std::array<float, 3>& value,
const domain_base<bool>& domain)
const;
125 operator()(
const std::array<float, 3>& value,
const vecf_domain<3>& domain)
const;
127 operator()(
const std::array<float, 3>& value,
const vector_domain& domain)
const;
130 operator()(
const std::array<float, 4>& value,
const domain_base<float>& domain)
const;
132 const std::array<float, 4>& value,
const domain_base<int32_t>& domain)
const;
134 operator()(
const std::array<float, 4>& value,
const domain_base<bool>& domain)
const;
136 operator()(
const std::array<float, 4>& value,
const vecf_domain<4>& domain)
const;
138 operator()(
const std::array<float, 4>& value,
const vector_domain& domain)
const;
141template <
typename Domain_T>
142struct list_apply_domain_helper
144 const apply_domain_visitor& vis;
147 template <
typename U>
150 return vis(std::forward<U>(u), dom);
156 const std::vector<ossia::value>& value,
const domain_base<T>& domain)
const
158 std::vector<ossia::value> res = value;
161 if(val.get_type() == ossia::value_trait<T>::ossia_enum)
162 val = ossia::apply_nonnull(
163 list_apply_domain_helper<domain_base<T>>{*
this, domain}, val.v);
170 std::vector<ossia::value>&& value,
const domain_base<T>& domain)
const
172 for(
auto& val : value)
174 if(val.get_type() == ossia::value_trait<T>::ossia_enum)
175 val = ossia::apply_nonnull(
176 list_apply_domain_helper<domain_base<T>>{*
this, domain}, std::move(val.v));
The value class.
Definition value.hpp:173
bounding_mode
Address behaviors at crossing domain boundaries.
Definition parameter_properties.hpp:56