25 #ifndef FABLE_CONFABLE_HPP_ 26 #define FABLE_CONFABLE_HPP_ 33 #define CONFABLE_FRIENDS(xType) \ 34 using ::fable::Confable::to_json; \ 35 friend void to_json(::fable::Json& j, const xType& t) { t.to_json(j); } \ 36 friend void from_json(const ::fable::Json& j, xType& t) { t.from_conf(::fable::Conf{j}); } 38 #define CONFABLE_SCHEMA(xType) \ 39 CONFABLE_FRIENDS(xType) \ 40 ::fable::Schema schema_impl() override 127 mutable std::unique_ptr<Schema> schema_;
135 struct adl_serializer<
fable::Confable> {
142 #endif // FABLE_CONFABLE_HPP_
Definition: confable.hpp:46
nlohmann::json Json
Definition: json.hpp:62
virtual void to_json(Json &j) const
Definition: confable.cpp:72
Definition: confable.hpp:132
virtual void validate(const Conf &c) const
Definition: confable.cpp:64
Json to_json() const
Definition: confable.cpp:74
Definition: schema.hpp:178
Schema & schema()
Definition: confable.cpp:55
virtual void from_conf(const Conf &c)
Definition: confable.cpp:66
virtual void reset_schema()
Definition: confable.cpp:53
virtual Schema schema_impl()
Definition: confable.cpp:80