Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 1 | #include "effecters.hpp" |
| 2 | |
Deepak Kodihalli | d078296 | 2019-05-07 16:36:47 +0530 | [diff] [blame] | 3 | #include <map> |
| 4 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 5 | namespace pldm |
| 6 | { |
| 7 | |
| 8 | namespace responder |
| 9 | { |
| 10 | |
| 11 | namespace effecter |
| 12 | { |
| 13 | |
| 14 | Id nextId() |
| 15 | { |
| 16 | static Id id = 0; |
| 17 | return ++id; |
| 18 | } |
| 19 | |
Deepak Kodihalli | d078296 | 2019-05-07 16:36:47 +0530 | [diff] [blame] | 20 | namespace dbus_mapping |
| 21 | { |
| 22 | |
| 23 | namespace internal |
| 24 | { |
| 25 | |
| 26 | std::map<Id, Paths> idToDbus{}; |
| 27 | |
| 28 | } // namespace internal |
| 29 | |
| 30 | void add(Id id, Paths&& paths) |
| 31 | { |
| 32 | internal::idToDbus.emplace(id, std::move(paths)); |
| 33 | } |
| 34 | |
| 35 | Paths get(Id id) |
| 36 | { |
| 37 | return internal::idToDbus.at(id); |
| 38 | } |
| 39 | |
| 40 | } // namespace dbus_mapping |
| 41 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 42 | } // namespace effecter |
| 43 | } // namespace responder |
| 44 | } // namespace pldm |