3 #include <nlohmann/json.hpp>
11 constexpr
static auto name() -> std::string_view {
return "disk"; }
32 nlohmann_json_j[
"size"] = nlohmann_json_t.
size;
34 nlohmann_json_j[
"coordinates"] = *nlohmann_json_t.
coordinates;
39 nlohmann_json_t.
size = nlohmann_json_j[
"size"];
40 if (
const auto& coords = nlohmann_json_j[
"coordinates"]; !coords.is_null()) {
friend void to_json(nlohmann::json &nlohmann_json_j, const DiskOptions &nlohmann_json_t)
constexpr static auto name() -> std::string_view
friend void from_json(const nlohmann::json &nlohmann_json_j, DiskOptions &nlohmann_json_t)
std::optional< std::string > get_coordinate_name() const
std::optional< Coordinates > coordinates
std::array< double, 2 > center
NLOHMANN_DEFINE_TYPE_INTRUSIVE(Coordinates, name, center, radius, degree_offset)