Lakshminarayana R. Kammath | 27693a4 | 2019-06-24 00:51:47 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "pldm_base_cmd.hpp" |
| 4 | |
| 5 | #include <functional> |
| 6 | #include <map> |
| 7 | #include <string> |
| 8 | #include <typeindex> |
| 9 | |
| 10 | using Cmd = std::string; |
| 11 | using Args = std::vector<std::string>; |
| 12 | class Handler |
| 13 | { |
| 14 | public: |
| 15 | const std::map<Cmd, std::function<void(Args&&)>> dispatcher{ |
| 16 | {"GetPLDMTypes", |
| 17 | [](Args&& args) { return getPLDMTypes(std::move(args)); }}, |
| 18 | {"GetPLDMVersion", |
| 19 | [](Args&& args) { return getPLDMVersion(std::move(args)); }}}; |
| 20 | }; |