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 
8 #ifndef DEVMGR_COMMON_MSG_PARSERS_HPP_
9 #define DEVMGR_COMMON_MSG_PARSERS_HPP_
10 
11 // Third party headers
12 #include <azmq/message.hpp>
13 
14 // Local headers
15 #include <rad/MsgHandler.hpp>
16 #include <rad/TopicHandler.hpp>
17 #include <rad/Dispatcher.hpp>
18 
19 
20 namespace devmgr {
21  namespace common {
22 
27  class MsgParsers : public rad::MsgHandler {
28 
29  public:
30 
36  MsgParsers(rad::Dispatcher& event_dispatcher);
37 
41  virtual ~MsgParsers();
42 
52  void handle(const std::string& identity, const std::string& payload_type,
53  void const* msg, size_t msg_size);
54 
55  MsgParsers(const MsgParsers&) = delete;
56  MsgParsers& operator=(const MsgParsers&) = delete;
57 
58  private:
59  rad::Dispatcher& m_dispatcher;
60  };
61 
66  class TopicParsers final : public rad::TopicHandler {
67 
68  public:
74  TopicParsers(rad::Dispatcher& event_dispatcher);
75 
85  void handle(const std::string& payload_type, void const* topic,
86  size_t topic_size);
87 
88  TopicParsers(const TopicParsers&) = delete;
89  TopicParsers& operator=(const MsgParsers&) = delete;
90 
91  private:
92  rad::Dispatcher& m_dispatcher;
93  };
94 
95  } // namespace common
96 } // namespace devmgr
97 
98 
99 #endif // DEVMGR_COMMON_MSG_PARSERS_HPP_
void handle(const std::string &payload_type, void const *topic, size_t topic_size)
Definition: msgParsers.cpp:207
TopicParsers(rad::Dispatcher &event_dispatcher)
Definition: msgParsers.cpp:203
Definition: MsgHandler.hpp:24
optional string msg
Definition: topics.proto:7
MsgParsers & operator=(const MsgParsers &)=delete
Disable copy constructor.
virtual ~MsgParsers()
Definition: msgParsers.cpp:28
Definition: Dispatcher.hpp:22
TopicParsers & operator=(const MsgParsers &)=delete
Disable assignment operator.
void handle(const std::string &identity, const std::string &payload_type, void const *msg, size_t msg_size)
Definition: msgParsers.cpp:32
MsgParsers(rad::Dispatcher &event_dispatcher)
Definition: msgParsers.cpp:23
Definition: TopicHandler.hpp:24