Telnet++  3.1.0.2
A C++ library for interacting with Telnet streams
command_router.hpp
1 #pragma once
2 
3 #include "telnetpp/command.hpp"
4 #include "telnetpp/detail/router.hpp"
5 
6 namespace telnetpp::detail {
7 
8 struct command_router_key_from_message_policy
9 {
10  static command_type key_from_message(command const &cmd)
11  {
12  return cmd.value();
13  }
14 };
15 
16 class command_router : public router<
17  command_type,
18  command,
19  void(command),
20  detail::command_router_key_from_message_policy>
21 {
22 };
23 
24 } // namespace telnetpp::detail