20template <
class T,
class S>
24#define PARAMS_TABLE(type_, ...) \
26 struct attribute_table<type_, S> { \
28 inline static const attribute_table_t<S> table{__VA_ARGS__}; \
32#define PARAMS_TABLE_CONF(type_, ...) \
33 template <Config Conf, class S> \
34 struct attribute_table<type_<Conf>, S> { \
35 using type = type_<Conf>; \
36 inline static const attribute_table_t<S> table{__VA_ARGS__}; \
41#define PARAMS_MEMBER(name, ...) \
43 #name, attribute_accessor<S>::template make<type>(&type::name, \
54template <
class T,
class S>
58#define PARAMS_ALIAS_TABLE(type_, ...) \
60 struct attribute_alias_table<type_, S> { \
62 inline static const attribute_alias_table_t<S> table{__VA_ARGS__}; \
66#define PARAMS_ALIAS_TABLE_CONF(type_, ...) \
67 template <Config Conf, class S> \
68 struct attribute_alias_table<type_<Conf>, S> { \
69 using type = type_<Conf>; \
70 inline static const attribute_alias_table_t<S> table{__VA_ARGS__}; \
75#define PARAMS_MEMBER_ALIAS(alias, name) \
80template <
class T,
class S>
84template <
class T,
class S>
85using enum_table_t = std::map<std::string_view, enum_accessor<T, S>>;
89template <
class T,
class S>
93#define ENUM_TABLE(type_, ...) \
95 struct enum_table<type_, S> { \
97 inline static const enum_table_t<type, S> table{__VA_ARGS__}; \
102#define ENUM_MEMBER(name, ...) \
104 #name, { type::name, __VA_ARGS__ } \
std::map< std::string_view, std::string_view > attribute_alias_table_t
Dictionary that maps struct attribute names to type-erased functions that set those attributes.
std::map< std::string_view, attribute_accessor< S > > attribute_table_t
Dictionary that maps struct attribute names to type-erased functions that set those attributes.
std::map< std::string_view, enum_accessor< T, S > > enum_table_t
Dictionary that maps enumerator names to their values and documentation.
Function wrapper to set attributes of a struct, type-erasing the type of the attribute.
Specialize this type to define the alternative attribute name to attribute setters dictionaries for a...
Specialize this type to define the attribute name to attribute setters dictionaries for a struct type...
Function wrapper access the enumerators of an enum, type-erasing the type of the enum.
Specialize this type to define the enumerator name to value dictionaries for an enum type T.