#pragma once #include #include "fourdst/config/config.h" #include #include void register_config_enums(const pybind11::module_& m); template pybind11::class_ bind_config_specialization(pybind11::module_& m , const std::string& name) { return pybind11::class_(m, name.c_str()) .def(pybind11::init<>()) .def("load", &ConfigType::load, pybind11::arg("file_path"), "Load configuration from a file.") .def("save", &ConfigType::save, pybind11::arg("file_path") = "config_output.toml", "Save configuration to a file.") .def("save_schema", &ConfigType::save_schema, pybind11::arg("directory") = ".", "Save the configuration schema to a directory.") .def("get_state", &ConfigType::get_state, "Get the current state of the configuration.") .def("describe_state", &ConfigType::describe_state, "Get the current state of the configuration.") .def("__repr__", [](const ConfigType &cfg) -> std::string { return std::format("{}", cfg); } ); }