53 namespace hana = boost::hana;
54 static constexpr auto accessors = hana::accessors<T>();
55 hana::for_each(accessors,
61 elem_det::make_property_name(name));
72 std::enable_if_t<meta::cfg::properties_definition_enabled_v<T>>> :
79 const std::string& name,
80 const std::string& description,
84 namespace hana = boost::hana;
85 static constexpr auto accessors = hana::accessors<T>();
92 if constexpr (elem_det::is_no_prop)
98 using sub_result_t = std::remove_reference_t<
decltype(pc.
required(
99 hana::second(e)(setter),
"",
"", constness))>;
100 const auto varname = hana::to<char const*>(hana::first(e));
102 required, hana::second(e)(setter), elem_det::make_property_name(name), \
103 description + " (parameter " + varname + ") " + elem_det::description_as_string(), \
106 static constexpr bool min_set =
107 simox::meta::is_not_undefined_t(elem_det::min);
108 static constexpr bool max_set =
109 simox::meta::is_not_undefined_t(elem_det::max);
110 if constexpr (std::is_same_v<sub_result_t, void> || (!min_set && !max_set))
117 if constexpr (min_set)
119 subpdef.setMin(elem_det::min);
121 if constexpr (max_set)
123 subpdef.setMax(elem_det::max);
PropertyDefinitionContainer.
decltype(auto) requiredOrOptional(bool isRequired, PropertyType &setter, const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
decltype(auto) required(PropertyType &setter, const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
Abstract PropertyUser class.
Property< PropertyType > getProperty(const std::string &name)
Property creation and retrieval.
#define ARMARX_TRACE_LITE