2 #include "block/block.hpp"
3 #include "board/board.hpp"
5 #include "pool/pool.hpp"
8 #include "nlohmann/json.hpp"
13 CoreBoard(
const std::string &board_filename,
const std::string &block_filename,
const std::string &via_dir,
15 bool has_object_type(ObjectType ty)
const override;
17 class Block *get_block(
bool work =
true)
override;
20 bool set_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
22 bool get_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
24 bool get_property_meta(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
27 std::string get_display_name(ObjectType type,
const UUID &uu)
override;
29 std::vector<Track *> get_tracks(
bool work =
true);
30 std::vector<Line *> get_lines(
bool work =
true)
override;
32 void rebuild(
bool from_undo =
false)
override;
33 void commit()
override;
34 void revert()
override;
35 void reload_netlist();
37 const Board *get_canvas_data();
38 Board *get_board(
bool work =
true);
39 const Board *get_board()
const;
41 class Rules *get_rules()
override;
44 return &fab_output_settings;
48 return &pdf_export_settings;
55 void update_rules()
override;
57 std::pair<Coordi, Coordi> get_bbox()
override;
59 bool can_search_for_object_type(ObjectType type)
const override;
60 std::list<SearchResult> search(
const SearchQuery &q)
override;
64 const std::string &get_filename()
const override;
67 std::map<UUID, Polygon> *get_polygon_map(
bool work =
true)
override;
68 std::map<UUID, Junction> *get_junction_map(
bool work =
true)
override;
69 std::map<UUID, Text> *get_text_map(
bool work =
true)
override;
70 std::map<UUID, Line> *get_line_map(
bool work =
true)
override;
71 std::map<UUID, Dimension> *get_dimension_map()
override;
72 std::map<UUID, Arc> *get_arc_map(
bool work =
true)
override;
73 std::map<UUID, Keepout> *get_keepout_map()
override;
86 std::string m_board_filename;
87 std::string m_block_filename;
88 std::string m_via_dir;
96 void history_push()
override;
97 void history_load(
unsigned int i)
override;
98 void save(
const std::string &suffix)
override;
99 void delete_autosave()
override;