blob: a48582bc0ca4b87812a5bc4c69867cd6287f2c00 [file] [log] [blame]
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05001#include "effecters.hpp"
2
Deepak Kodihallid0782962019-05-07 16:36:47 +05303#include <map>
4
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -05005namespace pldm
6{
7
8namespace responder
9{
10
11namespace effecter
12{
13
14Id nextId()
15{
16 static Id id = 0;
17 return ++id;
18}
19
Deepak Kodihallid0782962019-05-07 16:36:47 +053020namespace dbus_mapping
21{
22
23namespace internal
24{
25
26std::map<Id, Paths> idToDbus{};
27
28} // namespace internal
29
30void add(Id id, Paths&& paths)
31{
32 internal::idToDbus.emplace(id, std::move(paths));
33}
34
35Paths get(Id id)
36{
37 return internal::idToDbus.at(id);
38}
39
40} // namespace dbus_mapping
41
Deepak Kodihallic6e8fb52019-05-02 08:35:31 -050042} // namespace effecter
43} // namespace responder
44} // namespace pldm