Horizon
set.hpp
1 #pragma once
2 #include "nlohmann/json_fwd.hpp"
3 #include <map>
4 #include <string>
5 
6 namespace horizon {
7 using json = nlohmann::json;
8 
9 enum 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 };
26 using ParameterSet = std::map<ParameterID, int64_t>;
27 
28 json parameter_set_serialize(const ParameterSet &p);
29 ParameterSet parameter_set_from_json(const json &j);
30 
31 ParameterID parameter_id_from_string(const std::string &s);
32 const std::string &parameter_id_to_string(ParameterID id);
33 const std::string &parameter_id_to_name(ParameterID id);
34 } // namespace horizon
a class to store JSON values
Definition: json.hpp:166
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61