Horizon
Loading...
Searching...
No Matches
rule_match_component.hpp
1#pragma once
2#include "nlohmann/json_fwd.hpp"
3#include "util/uuid.hpp"
4#include <set>
5
6namespace horizon {
7using json = nlohmann::json;
8
10public:
12 RuleMatchComponent(const json &j);
13 json serialize() const;
14 std::string get_brief(const class Block *block = nullptr, class IPool *pool = nullptr) const;
15 void cleanup(const class Block *block);
16 bool can_export() const;
17
18 bool matches(const class Component *component) const;
19
20 enum class Mode { COMPONENT, PART, COMPONENTS };
21 Mode mode = Mode::COMPONENT;
22
23 UUID component;
24 std::set<UUID> components;
25 UUID part;
26
27 bool match(const class Component *component) const;
28};
29} // 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:40
Definition ipool.hpp:15
Definition rule_match_component.hpp:9
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