rad  2.0.0
 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 {{cookiecutter.module_name|upper}}_MSG_PARSERS_HPP_
10 #define {{cookiecutter.module_name|upper}}_MSG_PARSERS_HPP_
11 
12 #include <rad/msgHandler.hpp>
13 #include <rad/topicHandler.hpp>
14 #include <rad/smAdapter.hpp>
15 
16 #include <azmq/message.hpp>
17 
18 namespace {{cookiecutter.module_name}} {
19 
24 class MsgParsers final : public rad::MsgHandler {
25 
26 public:
27  explicit MsgParsers(rad::SMAdapter& sm);
28  virtual ~MsgParsers();
29 
30  void Handle(const std::string& identity, const std::string& payload_type, void const* msg, size_t sz) override;
31 
32  MsgParsers(const MsgParsers&) = delete;
33  MsgParsers& operator= (const MsgParsers&) = delete;
34 
35 private:
36  rad::SMAdapter& m_sm;
37 };
38 
43 class TopicParsers final : public rad::TopicHandler {
44 
45 public:
46  explicit TopicParsers(rad::SMAdapter& sm);
47 
48  void Handle(const std::string& payload_type, void const* msg, size_t sz) override;
49 
50  TopicParsers(const TopicParsers&) = delete;
51  TopicParsers& operator= (const MsgParsers&) = delete;
52 
53 private:
54  rad::SMAdapter& m_sm;
55 };
56 
57 } // namespace {{cookiecutter.module_name}}
58 
59 #endif // {{cookiecutter.module_name|upper}}_MSG_PARSERS_HPP_
Definition: msgHandler.hpp:23
virtual void Handle(const std::string &topic_type_id, const void *data, size_t data_size)=0
virtual void Handle(const std::string &identity, const std::string &msg_type_id, const void *data, size_t data_size)=0
Definition: smAdapter.hpp:42
#define cookiecutter
Definition: topicHandler.hpp:23