Horizon
src
imp
airwire_filter.hpp
1
#pragma once
2
#include "canvas/iairwire_filter.hpp"
3
#include <map>
4
#include <set>
5
#include "util/uuid.hpp"
6
#include "util/changeable.hpp"
7
8
namespace
horizon {
9
class
AirwireFilter
:
public
IAirwireFilter
,
public
Changeable
{
10
public
:
11
AirwireFilter
(
const
class
Board
&brd);
12
bool
airwire_is_visible(
const
class
UUID
&net)
const override
;
13
14
void
update_from_board();
15
void
set_visible(
const
UUID
&net,
bool
v);
16
void
set_all(
bool
v);
17
void
set_only(
const
std::set<UUID> &nets);
18
19
class
AirwireInfo
{
20
public
:
21
bool
visible =
true
;
22
unsigned
int
n = 0;
23
};
24
25
const
std::map<UUID, AirwireInfo> &get_airwires()
const
26
{
27
return
airwires;
28
}
29
30
private
:
31
const
class
Board
&board;
32
std::map<UUID, AirwireInfo> airwires;
33
};
34
}
// namespace horizon
horizon::AirwireFilter
Definition:
airwire_filter.hpp:9
horizon::Changeable
Definition:
changeable.hpp:5
horizon::Board
Definition:
board.hpp:43
horizon::IAirwireFilter
Definition:
iairwire_filter.hpp:5
horizon::AirwireFilter::AirwireInfo
Definition:
airwire_filter.hpp:19
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition:
uuid.hpp:16
Generated by
1.8.17