Brad Bishop | 26b815f | 2017-01-04 13:32:47 -0500 | [diff] [blame] | 1 | #pragma once |
Patrick Williams | 3667cf3 | 2015-10-20 22:39:11 -0500 | [diff] [blame] | 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>, |
Brad Bishop | 6bb97a9 | 2016-12-19 13:06:40 -0500 | [diff] [blame] | 11 | std::set<std::string>> container_t; |
Brad Bishop | 75017ae | 2017-01-05 12:07:04 -0500 | [diff] [blame] | 12 | using mapped_type = container_t::mapped_type; |
| 13 | using key_type = container_t::key_type; |
Patrick Williams | 3667cf3 | 2015-10-20 22:39:11 -0500 | [diff] [blame] | 14 | |
Brad Bishop | 92bbd05 | 2017-01-05 06:53:02 -0500 | [diff] [blame] | 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; |
Patrick Williams | 3667cf3 | 2015-10-20 22:39:11 -0500 | [diff] [blame] | 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 | |
Brad Bishop | 03476f1 | 2016-12-19 13:09:12 -0500 | [diff] [blame] | 38 | // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |