2 #include "common/arc.hpp"
3 #include "common/common.hpp"
4 #include "common/hole.hpp"
5 #include "common/junction.hpp"
6 #include "common/layer_provider.hpp"
7 #include "common/line.hpp"
8 #include "common/object_provider.hpp"
9 #include "common/polygon.hpp"
10 #include "common/text.hpp"
11 #include "common/keepout.hpp"
12 #include "common/dimension.hpp"
13 #include "nlohmann/json_fwd.hpp"
14 #include "package/package_rules.hpp"
15 #include "package/pad.hpp"
16 #include "util/uuid.hpp"
17 #include "util/warning.hpp"
18 #include "parameter/program_polygon.hpp"
19 #include "common/picture.hpp"
24 #include "util/file_version.hpp"
35 std::map<UUID, Polygon> &get_polygons()
override;
38 ParameterProgram::CommandHandler get_command(
const std::string &cmd)
override;
47 Model(
const UUID &uu,
const std::string &filename);
61 json serialize()
const;
66 static Package new_from_file(
const std::string &filename,
class IPool &pool);
68 json serialize()
const;
71 std::pair<Coordi, Coordi> get_bbox()
const;
72 const std::map<int, Layer> &get_layers()
const override;
73 std::pair<bool, std::string> apply_parameter_set(
const ParameterSet &ps);
75 void update_warnings();
76 int get_max_pad_name()
const;
78 UUID get_uuid()
const;
81 void operator=(
Package const &pkg);
85 std::string manufacturer;
86 std::set<std::string> tags;
88 std::map<UUID, Junction> junctions;
89 std::map<UUID, Line> lines;
90 std::map<UUID, Arc> arcs;
91 std::map<UUID, Text> texts;
92 std::map<UUID, Pad> pads;
93 std::map<UUID, Polygon> polygons;
94 std::map<UUID, Keepout> keepouts;
95 std::map<UUID, Dimension> dimensions;
96 std::map<UUID, Picture> pictures;
98 ParameterSet parameter_set;
102 std::map<UUID, Model> models;
106 const class Package *alternate_for =
nullptr;
110 std::vector<Warning> warnings;
112 void update_refs(
class IPool &pool);
114 void save_pictures(
const std::string &dir)
const;
115 void load_pictures(
const std::string &dir);