Horizon
horizon-eda-1.3.0
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)
override
;
15
RulesCheckResult
check(RuleID
id
,
const
class
Schematic
&sch,
class
RulesCheckCache
&cache)
const
;
16
void
apply(RuleID
id
,
class
Schematic
*sch);
17
json
serialize()
const override
;
18
std::set<RuleID> get_rule_ids()
const override
;
19
const
Rule
*get_rule(RuleID
id
)
const override
;
20
const
Rule
*get_rule(RuleID
id
,
const
UUID
&uu)
const override
;
21
std::map<UUID, const Rule *> get_rules(RuleID
id
)
const override
;
22
void
remove_rule(RuleID
id
,
const
UUID
&uu)
override
;
23
Rule
*add_rule(RuleID
id
)
override
;
24
25
private
:
26
RuleSinglePinNet
rule_single_pin_net;
27
28
RulesCheckResult
check_single_pin_net(
const
class
Schematic
&sch,
class
RulesCheckCache
&cache)
const
;
29
};
30
}
// namespace horizon
horizon::RuleSinglePinNet
Definition:
rule_single_pin_net.hpp:5
horizon::RulesCheckCache
Definition:
cache.hpp:43
horizon::Rules
Definition:
rules.hpp:48
horizon::Rule
Definition:
rule.hpp:33
horizon::Schematic
A Schematic is the visual representation of a Block.
Definition:
schematic.hpp:29
horizon::SchematicRules
Definition:
schematic_rules.hpp:10
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:166
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition:
uuid.hpp:16
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
horizon::RulesCheckResult
Definition:
rules.hpp:34
Generated by
1.8.20