Alexander Hansen | 7ba70c8 | 2024-07-23 13:46:25 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "ledlayout.hpp" |
| 4 | |
| 5 | #include <string> |
| 6 | #include <unordered_map> |
| 7 | |
| 8 | namespace phosphor |
| 9 | { |
| 10 | namespace led |
| 11 | { |
| 12 | /** @namespace Layout |
| 13 | * @brief Depicts the LED and their mappings and group actions |
| 14 | */ |
| 15 | namespace Layout |
| 16 | { |
| 17 | |
| 18 | /** @brief Name of the Group and its properties |
| 19 | */ |
| 20 | struct GroupLayout |
| 21 | { |
| 22 | int priority = 0; |
| 23 | ActionSet actionSet; |
| 24 | }; |
| 25 | |
| 26 | struct CompareGroupLayout |
| 27 | { |
| 28 | bool operator()(const Layout::GroupLayout* lhs, |
| 29 | const Layout::GroupLayout* rhs) const |
| 30 | { |
| 31 | return lhs->priority < rhs->priority; |
| 32 | }; |
| 33 | }; |
| 34 | |
| 35 | } // namespace Layout |
| 36 | |
| 37 | using GroupMap = std::unordered_map<std::string, Layout::GroupLayout>; |
| 38 | |
| 39 | } // namespace led |
| 40 | } // namespace phosphor |