raw_subscriber.h
Go to the documentation of this file.
00001 #ifndef MESSAGE_TRANSPORT_RAW_SUBSCRIBER_H
00002 #define MESSAGE_TRANSPORT_RAW_SUBSCRIBER_H
00003 
00004 #include "message_transport/simple_subscriber_plugin.h"
00005 
00006 namespace message_transport {
00007 
00014 template <class M>
00015 class RawSubscriber : public SimpleSubscriberPlugin<M,M>
00016 {
00017 public:
00018   virtual ~RawSubscriber() {}
00019 
00020   virtual std::string getTransportName() const
00021   {
00022     return "raw";
00023   }
00024 
00025 protected:
00026   virtual void internalCallback(const typename M::ConstPtr& message, 
00027                   const typename SimpleSubscriberPlugin<M,M>::Callback& user_cb)
00028   {
00029     user_cb(message);
00030   }
00031 
00032   virtual std::string getTopicToSubscribe(const std::string& base_topic) const
00033   {
00034     return base_topic;
00035   }
00036 };
00037 
00038 } //namespace message_transport
00039 
00040 #endif


message_transport_common
Author(s): Cedric Pradalier
autogenerated on Sun Oct 5 2014 23:48:49