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