raw_publisher.h
Go to the documentation of this file.
00001 #ifndef MESSAGE_TRANSPORT_RAW_PUBLISHER_H
00002 #define MESSAGE_TRANSPORT_RAW_PUBLISHER_H
00003 
00004 #include "message_transport/simple_publisher_plugin.h"
00005 
00006 namespace message_transport {
00007 
00014 template <class M>
00015 class RawPublisher : public SimplePublisherPlugin<M,M>
00016 {
00017 public:
00018   virtual ~RawPublisher() {}
00019 
00020   virtual std::string getTransportName() const
00021   {
00022     return "raw";
00023   }
00024 
00025 protected:
00026   virtual void publish(const M& message, 
00027                   const typename SimplePublisherPlugin<M,M>::PublishFn& publish_fn) const
00028   {
00029     publish_fn(message);
00030   }
00031 
00032   virtual std::string getTopicToAdvertise(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 Sat Dec 28 2013 16:56:55