xref: /openbmc/phosphor-hwmon/sensorset.hpp (revision 6292aeed)
1*6292aeedSMatthew Barth #ifndef __SENSORSET_H
2*6292aeedSMatthew Barth #define __SENSORSET_H
3*6292aeedSMatthew Barth 
4*6292aeedSMatthew Barth #include <map>
5*6292aeedSMatthew Barth #include <set>
6*6292aeedSMatthew Barth #include <string>
7*6292aeedSMatthew Barth 
8*6292aeedSMatthew Barth class SensorSet
9*6292aeedSMatthew Barth {
10*6292aeedSMatthew Barth     public:
11*6292aeedSMatthew Barth         typedef std::map<std::pair<std::string, std::string>,
12*6292aeedSMatthew Barth                          std::set<std::string>> container_t;
13*6292aeedSMatthew Barth 
14*6292aeedSMatthew Barth         SensorSet(const std::string& path);
15*6292aeedSMatthew Barth 
16*6292aeedSMatthew Barth         container_t::const_iterator begin()
17*6292aeedSMatthew Barth         {
18*6292aeedSMatthew Barth             return const_cast<const container_t&>(container).begin();
19*6292aeedSMatthew Barth         }
20*6292aeedSMatthew Barth 
21*6292aeedSMatthew Barth         container_t::const_iterator end()
22*6292aeedSMatthew Barth         {
23*6292aeedSMatthew Barth             return const_cast<const container_t&>(container).end();
24*6292aeedSMatthew Barth         }
25*6292aeedSMatthew Barth 
26*6292aeedSMatthew Barth     private:
27*6292aeedSMatthew Barth         container_t container;
28*6292aeedSMatthew Barth 
29*6292aeedSMatthew Barth };
30*6292aeedSMatthew Barth 
31*6292aeedSMatthew Barth #endif
32