Horizon
rule_clearance_copper_keepout.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include "rules/rule.hpp"
4 #include "rules/rule_match.hpp"
5 #include "rules/rule_match_keepout.hpp"
6 
7 namespace horizon {
9 public:
10  static const auto id = RuleID::CLEARANCE_COPPER_KEEPOUT;
11  RuleID get_id() const override
12  {
13  return id;
14  }
15 
17  RuleClearanceCopperKeepout(const UUID &uu, const json &j);
18  json serialize() const override;
19 
20  std::string get_brief(const class Block *block = nullptr, class IPool *pool = nullptr) const override;
21  bool is_match_all() const override;
22 
23  uint64_t get_clearance(PatchType pt_copper) const;
24  void set_clearance(PatchType pt_copper, uint64_t c);
25  uint64_t get_max_clearance() const;
26 
27  RuleMatch match;
28  RuleMatchKeepout match_keepout;
29  uint64_t routing_offset = 0.05_mm;
30 
31 private:
32  std::map<PatchType, uint64_t> clearances;
33 };
34 } // namespace horizon
A block is one level of hierarchy in the netlist.
Definition: block.hpp:29
Definition: ipool.hpp:14
Definition: rule_clearance_copper_keepout.hpp:8
Definition: rule_match_keepout.hpp:8
Definition: rule_match.hpp:8
Definition: rule.hpp:54
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
a class to store JSON values
Definition: json.hpp:177
zip_uint64_t uint64_t
zip_uint64_t_t typedef.
Definition: zip.hpp:108