3 #include "pool/padstack.hpp"
4 #include "document/idocument_padstack.hpp"
7 class CorePadstack :
public Core,
public virtual IDocumentPadstack {
9 CorePadstack(
const std::string &filename, IPool &pool);
10 bool has_object_type(ObjectType ty)
const override;
12 class LayerProvider &get_layer_provider()
override;
14 void rebuild(
bool from_undo =
false)
override;
18 bool set_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
20 bool get_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
22 bool get_property_meta(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
25 std::string get_display_name(ObjectType type,
const UUID &uu)
override;
28 std::pair<Coordi, Coordi> get_bbox()
override;
30 const std::string &get_filename()
const override;
32 ObjectType get_object_type()
const override
34 return ObjectType::PADSTACK;
39 return padstack.version;
43 std::map<UUID, Polygon> *get_polygon_map()
override;
44 std::map<UUID, Hole> *get_hole_map()
override;
47 std::string m_filename;
49 class HistoryItem :
public Core::HistoryItem {
51 HistoryItem(
const Padstack &s) : padstack(s)
56 void history_push()
override;
57 void history_load(
unsigned int i)
override;
58 void save(
const std::string &suffix)
override;
59 void delete_autosave()
override;
62 std::string parameter_program_code;
63 ParameterSet parameter_set;
64 std::set<ParameterID> parameters_required;