31 namespace fable::schema {
37 Boolean(Type* ptr, std::string desc);
41 bool validate(
const Conf& c, std::optional<SchemaError>& err)
const override;
45 [[nodiscard]]
Json serialize(
const Type& x)
const;
46 [[nodiscard]] Type deserialize(
const Conf& c)
const;
47 void serialize_into(
Json& j,
const Type& x)
const;
48 void deserialize_into(
const Conf& c, Type& x)
const;
55 inline Boolean make_schema(
bool* ptr, std::string desc) {
return {ptr, std::move(desc)}; }
Definition: interface.hpp:398
Definition: boolean.hpp:33
void from_conf(const Conf &c) override
Definition: boolean.cpp:50
Json json_schema() const override
Definition: boolean.cpp:33
virtual Json to_json() const
Definition: interface.hpp:254
bool validate(const Conf &c, std::optional< SchemaError > &err) const override
Definition: boolean.cpp:41
void reset_ptr() override
Definition: boolean.cpp:63
virtual Json to_json() const
Definition: interface.hpp:254
nlohmann::json Json
Definition: fable_fwd.hpp:35