Horizon
Loading...
Searching...
No Matches
set.hpp
1#pragma once
2#include "nlohmann/json_fwd.hpp"
3#include <map>
4#include <string>
5
6namespace horizon {
7using json = nlohmann::json;
8
9enum class ParameterID {
10 INVALID,
11 PAD_WIDTH,
12 PAD_HEIGHT,
13 PAD_DIAMETER,
14 SOLDER_MASK_EXPANSION,
15 PASTE_MASK_CONTRACTION,
16 HOLE_DIAMETER,
17 HOLE_LENGTH,
18 COURTYARD_EXPANSION,
19 VIA_DIAMETER,
20 HOLE_SOLDER_MASK_EXPANSION,
21 VIA_SOLDER_MASK_EXPANSION,
22 HOLE_ANNULAR_RING,
23 CORNER_RADIUS,
24 N_PARAMETERS
25};
26using ParameterSet = std::map<ParameterID, int64_t>;
27
28json parameter_set_serialize(const ParameterSet &p);
29ParameterSet parameter_set_from_json(const json &j);
30
31ParameterID parameter_id_from_string(const std::string &s);
32const std::string &parameter_id_to_string(ParameterID id);
33const std::string &parameter_id_to_name(ParameterID id);
34} // namespace horizon
a class to store JSON values
Definition json.hpp:177
basic_json<> json
default JSON class
Definition json_fwd.hpp:62