Horizon
src
schematic
schematic_rules.hpp
1
#pragma once
2
#include "util/uuid.hpp"
3
#include "nlohmann/json_fwd.hpp"
4
#include "rules/rules.hpp"
5
#include "rule_single_pin_net.hpp"
6
7
namespace
horizon {
8
using
json
=
nlohmann::json
;
9
10
class
SchematicRules
:
public
Rules
{
11
public
:
12
SchematicRules
();
13
14
void
load_from_json(
const
json
&j);
15
RulesCheckResult
check(RuleID
id
,
const
class
Schematic
*sch,
class
RulesCheckCache
&cache);
16
void
apply(RuleID
id
,
class
Schematic
*sch);
17
json
serialize()
const
;
18
std::set<RuleID> get_rule_ids()
const
;
19
Rule
*get_rule(RuleID
id
);
20
Rule
*get_rule(RuleID
id
,
const
UUID
&uu);
21
std::map<UUID, Rule *> get_rules(RuleID
id
);
22
void
remove_rule(RuleID
id
,
const
UUID
&uu);
23
Rule
*add_rule(RuleID
id
);
24
25
private
:
26
RuleSinglePinNet
rule_single_pin_net;
27
28
RulesCheckResult
check_single_pin_net(
const
class
Schematic
*sch,
class
RulesCheckCache
&cache);
29
};
30
}
// namespace horizon
horizon::RuleSinglePinNet
Definition:
rule_single_pin_net.hpp:5
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
horizon::RulesCheckCache
Definition:
cache.hpp:43
horizon::Rules
Definition:
rules.hpp:44
horizon::Rule
Definition:
rule.hpp:26
horizon::Schematic
A Schematic is the visual representation of a Block.
Definition:
schematic.hpp:27
horizon::SchematicRules
Definition:
schematic_rules.hpp:10
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:161
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition:
uuid.hpp:16
horizon::RulesCheckResult
Definition:
rules.hpp:31
Generated by
1.8.16