Horizon
rule_match_component.hpp
1 #pragma once
2 #include "nlohmann/json_fwd.hpp"
3 #include "util/uuid.hpp"
4 
5 namespace horizon {
6 using json = nlohmann::json;
7 
9 public:
11  RuleMatchComponent(const json &j);
12  json serialize() const;
13  std::string get_brief(const class Block *block = nullptr, class IPool *pool = nullptr) const;
14  void cleanup(const class Block *block);
15  bool can_export() const;
16 
17  bool matches(const class Component *component) const;
18 
19  enum class Mode { COMPONENT, PART };
20  Mode mode = Mode::COMPONENT;
21 
22  UUID component;
23  UUID part;
24 
25  bool match(const class Component *component) const;
26 };
27 } // namespace horizon
A block is one level of hierarchy in the netlist.
Definition: block.hpp:29
A Component is an instanced Entity in a Block.
Definition: component.hpp:41
Definition: ipool.hpp:14
Definition: rule_match_component.hpp:8
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
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62