ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
msgParsers.hpp
Go to the documentation of this file.
1 
9 #ifndef SERVER_MSG_PARSERS_HPP_
10 #define SERVER_MSG_PARSERS_HPP_
11 
12 #include <rad/MsgHandler.hpp>
13 #include <rad/TopicHandler.hpp>
14 #include <rad/Dispatcher.hpp>
15 
16 #include <azmq/message.hpp>
17 
18 namespace server {
19 
24 class MsgParsers final : public rad::MsgHandler {
25 
26  public:
27 
33  MsgParsers(rad::Dispatcher& event_dispatcher);
34 
38  virtual ~MsgParsers();
39 
49  void handle(const std::string& identity, const std::string& payload_type,
50  void const* msg, size_t msg_size) override;
51 
52  MsgParsers(const MsgParsers&) = delete;
53  MsgParsers& operator=(const MsgParsers&) = delete;
54 
55  private:
56  rad::Dispatcher& m_dispatcher;
57 };
58 
63 class TopicParsers final : public rad::TopicHandler {
64 
65  public:
71  TopicParsers(rad::Dispatcher& event_dispatcher);
72 
82  void handle(const std::string& payload_type, void const* topic,
83  size_t topic_size) override;
84 
85  TopicParsers(const TopicParsers&) = delete;
86  TopicParsers& operator=(const MsgParsers&) = delete;
87 
88  private:
89  rad::Dispatcher& m_dispatcher;
90 };
91 
92 } // namespace server
93 
94 #endif // SERVER_MSG_PARSERS_HPP_
MsgParsers & operator=(const MsgParsers &)=delete
Disable copy constructor.
Definition: MsgHandler.hpp:24
MsgParsers(rad::Dispatcher &event_dispatcher)
Definition: msgParsers.cpp:22
TopicParsers(rad::Dispatcher &event_dispatcher)
Definition: msgParsers.cpp:88
optional string msg
Definition: topics.proto:7
def server
Definition: hellorad.py:88
void handle(const std::string &payload_type, void const *topic, size_t topic_size) override
Definition: msgParsers.cpp:92
virtual ~MsgParsers()
Definition: msgParsers.cpp:27
void handle(const std::string &identity, const std::string &payload_type, void const *msg, size_t msg_size) override
Definition: msgParsers.cpp:31
Definition: Dispatcher.hpp:22
TopicParsers & operator=(const MsgParsers &)=delete
Disable copy constructor.
Definition: TopicHandler.hpp:24