Horizon
horizon-eda-1.3.0
src
symbol
symbol_rules.hpp
1
#pragma once
2
#include "nlohmann/json_fwd.hpp"
3
#include "rule_symbol_checks.hpp"
4
#include "rules/rules.hpp"
5
#include "util/uuid.hpp"
6
7
namespace
horizon {
8
using
json
=
nlohmann::json
;
9
10
class
SymbolRules
:
public
Rules
{
11
public
:
12
SymbolRules
();
13
14
void
load_from_json(
const
json
&j)
override
;
15
RulesCheckResult
check(RuleID
id
,
const
class
Symbol
&sym)
const
;
16
json
serialize()
const override
;
17
std::set<RuleID> get_rule_ids()
const override
;
18
const
Rule
*get_rule(RuleID
id
)
const override
;
19
const
Rule
*get_rule(RuleID
id
,
const
UUID
&uu)
const override
;
20
std::map<UUID, const Rule *> get_rules(RuleID
id
)
const override
;
21
void
remove_rule(RuleID
id
,
const
UUID
&uu)
override
;
22
Rule
*add_rule(RuleID
id
)
override
;
23
24
private
:
25
RuleSymbolChecks
rule_symbol_checks;
26
27
RulesCheckResult
check_symbol(
const
class
Symbol
&sym)
const
;
28
};
29
}
// namespace horizon
horizon::Rules
Definition:
rules.hpp:48
horizon::Rule
Definition:
rule.hpp:33
horizon::SymbolRules
Definition:
symbol_rules.hpp:10
horizon::Symbol
Definition:
symbol.hpp:71
horizon::RuleSymbolChecks
Definition:
rule_symbol_checks.hpp:6
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