Horizon
src
rules
rule_match.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
8
class
RuleMatch {
9
public
:
10
RuleMatch();
11
RuleMatch(
const
json
&j);
12
json
serialize()
const
;
13
std::string get_brief(
const
class
Block *block =
nullptr
)
const
;
14
void
cleanup(
const
class
Block *block);
15
16
enum class
Mode { ALL, NET, NET_CLASS, NET_NAME_REGEX };
17
Mode mode = Mode::ALL;
18
19
UUID net;
20
UUID net_class;
21
std::string net_name_regex;
22
23
bool
match(
const
class
Net *net)
const
;
24
};
25
}
// namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
Generated by
1.8.20