2#include <ossia/network/base/parameter_data.hpp>
3#include <ossia/network/dataspace/dataspace.hpp>
4#include <ossia/network/dataspace/dataspace_base_fwd.hpp>
6#include <ossia/network/dataspace/detail/dataspace_parse.hpp>
8#include <boost/algorithm/string/case_conv.hpp>
12template <
typename InsertFun>
13void list_units(InsertFun fun)
16 ossia::for_each_tagged(dataspace_u_list{}, [&](
auto t) {
18 using dataspace_type =
typename decltype(t)::type;
19 using d_traits = dataspace_traits<dataspace_type>;
20 for(
auto dn : d_traits::text())
22 std::string dataspace_name(dn);
23 boost::algorithm::to_lower(dataspace_name);
24 using neutral_u =
typename d_traits::neutral_unit;
26 fun(dataspace_name, neutral_u{});
28 ossia::for_each_tagged(dataspace_type{}, [&](
auto u) {
29 using unit_type =
typename decltype(u)::type;
31 for(
auto un : unit_traits<unit_type>::text())
34 std::string s = boost::algorithm::to_lower_copy(std::string(un));
35 fun(dataspace_name +
"." + s, unit_type{});
36 fun(std::move(s), unit_type{});
42 fun(
"complex", ossia::cartesian_2d_u{});
43 fun(
"point2d", ossia::cartesian_2d_u{});
44 fun(
"2d", ossia::cartesian_2d_u{});
45 fun(
"cartesian2d", ossia::cartesian_2d_u{});
47 fun(
"pos", ossia::cartesian_3d_u{});
48 fun(
"point", ossia::cartesian_3d_u{});
49 fun(
"point3d", ossia::cartesian_3d_u{});
50 fun(
"3d", ossia::cartesian_3d_u{});
51 fun(
"cartesian3d", ossia::cartesian_3d_u{});
52 fun(
"coord", ossia::cartesian_3d_u{});
53 fun(
"coordinate", ossia::cartesian_3d_u{});
54 fun(
"coordinates", ossia::cartesian_3d_u{});
55 fun(
"pvector", ossia::cartesian_3d_u{});
56 fun(
"vertex", ossia::cartesian_3d_u{});
58 fun(
"gl", ossia::opengl_u{});
59 fun(
"opengl", ossia::opengl_u{});
60 fun(
"position.gl", ossia::opengl_u{});
61 fun(
"position.opengl", ossia::opengl_u{});
63 fun(
"freq", ossia::frequency_u{});
64 fun(
"frequence", ossia::frequency_u{});
65 fun(
"frequency", ossia::frequency_u{});
67 fun(
"col", ossia::rgba8_u{});
68 fun(
"color", ossia::rgba8_u{});
71 fun(
"rot", ossia::dataspace_traits<angle_u>::neutral_unit{});
72 fun(
"rotation", ossia::dataspace_traits<angle_u>::neutral_unit{});
74 fun(
"meter", ossia::meter_u{});
75 fun(
"decimeter", ossia::decimeter_u{});
76 fun(
"centimeter", ossia::centimeter_u{});
77 fun(
"millimeter", ossia::millimeter_u{});
78 fun(
"micrometer", ossia::micrometer_u{});
79 fun(
"nanometer", ossia::nanometer_u{});
80 fun(
"picometer", ossia::picometer_u{});
Definition transitive_closure.hpp:27
The data that can be found inside a parameter.
Definition parameter_data.hpp:21