CAF 0.17.6
|
Enables user-defined types in config files and on the CLI by converting them to and from config_value::dictionary
.
More...
#include <config_value_object_access.hpp>
Public Types | |
using | object_type = typename Trait::object_type |
Static Public Member Functions | |
static std::string | type_name () |
static bool | extract (const config_value *src, object_type *dst) |
static bool | is (const config_value &x) |
static optional< object_type > | get_if (const config_value *x) |
static object_type | get (const config_value &x) |
static config_value::dictionary | convert (const object_type &x) |
template<class Nested > | |
static void | parse_cli (string_parser_state &ps, object_type &x, Nested) |
Enables user-defined types in config files and on the CLI by converting them to and from config_value::dictionary
.
~~ struct trait { using object_type = ...;
static string_value type_name();
static span<config_value_field<object_type>*> fields(); }; ~~