forked from openbmc/phosphor-hwmon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sensorset.hpp
38 lines (30 loc) · 994 Bytes
/
sensorset.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <map>
#include <set>
#include <string>
class SensorSet
{
public:
typedef std::map<std::pair<std::string, std::string>,
std::set<std::string>> container_t;
using mapped_type = container_t::mapped_type;
using key_type = container_t::key_type;
explicit SensorSet(const std::string& path);
~SensorSet() = default;
SensorSet() = delete;
SensorSet(const SensorSet&) = delete;
SensorSet& operator=(const SensorSet&) = delete;
SensorSet(SensorSet&&) = default;
SensorSet& operator=(SensorSet&&) = default;
container_t::const_iterator begin()
{
return const_cast<const container_t&>(container).begin();
}
container_t::const_iterator end()
{
return const_cast<const container_t&>(container).end();
}
private:
container_t container;
};
// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4