Horizon
rule_clearance_copper_other.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include "rules/rule.hpp"
4 #include "rules/rule_match.hpp"
5 
6 namespace horizon {
7 class RuleClearanceCopperOther : public Rule {
8 public:
10  RuleClearanceCopperOther(const UUID &uu, const json &j);
11  json serialize() const override;
12 
13  std::string get_brief(const class Block *block = nullptr) const;
14 
15  uint64_t get_clearance(PatchType pt_copper, PatchType pt_non_copper) const;
16  void set_clearance(PatchType pt_copper, PatchType pt_non_copper, uint64_t c);
17  uint64_t get_max_clearance() const;
18 
19  RuleMatch match;
20  int layer = 10000;
21  uint64_t routing_offset = 0.05_mm;
22 
23 private:
24  std::map<std::pair<PatchType, PatchType>, uint64_t> clearances;
25 };
26 } // namespace horizon
a class to store JSON values
Definition: json.hpp:161
Definition: rule_match.hpp:8
Definition: rule.hpp:26
A block is one level of hierarchy in the netlist.
Definition: block.hpp:26
Definition: rule_clearance_copper_other.hpp:7
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
Definition: block.cpp:9