Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <array> |
| 4 | #include <string> |
| 5 | |
| 6 | namespace utils |
| 7 | { |
| 8 | namespace literals |
| 9 | { |
| 10 | |
| 11 | constexpr char id[] = "id"; |
| 12 | constexpr char sensorPaths[] = "sensorPaths"; |
| 13 | constexpr char operationType[] = "operationType"; |
| 14 | constexpr char metricMetadata[] = "metricMetadata"; |
| 15 | |
| 16 | } // namespace literals |
| 17 | |
| 18 | template <const char* const V> |
| 19 | struct Label |
| 20 | { |
| 21 | static std::string str() |
| 22 | { |
| 23 | return V; |
| 24 | } |
| 25 | }; |
| 26 | |
| 27 | namespace tstring |
| 28 | { |
| 29 | |
| 30 | using Id = utils::Label<utils::literals::id>; |
| 31 | using SensorPaths = utils::Label<utils::literals::sensorPaths>; |
| 32 | using OperationType = utils::Label<utils::literals::operationType>; |
| 33 | using MetricMetadata = utils::Label<utils::literals::metricMetadata>; |
| 34 | |
| 35 | } // namespace tstring |
| 36 | } // namespace utils |