Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ROSCPP_SINGLE_SUBSCRIBER_PUBLISHER_H
00029 #define ROSCPP_SINGLE_SUBSCRIBER_PUBLISHER_H
00030
00031 #include "ros/forwards.h"
00032 #include "ros/serialization.h"
00033 #include "common.h"
00034
00035 #include <boost/utility.hpp>
00036
00037 namespace ros
00038 {
00039
00043 class ROSCPP_DECL SingleSubscriberPublisher : public boost::noncopyable
00044 {
00045 public:
00046 SingleSubscriberPublisher(const SubscriberLinkPtr& link);
00047 ~SingleSubscriberPublisher();
00048
00057 template<class M>
00058 void publish(const boost::shared_ptr<M const>& message) const
00059 {
00060 publish(*message);
00061 }
00062
00071 template<class M>
00072 void publish(const boost::shared_ptr<M>& message) const
00073 {
00074 publish(*message);
00075 }
00076
00080 template<class M>
00081 void publish(const M& message) const
00082 {
00083 using namespace serialization;
00084 SerializedMessage m = serializeMessage(message);
00085 publish(m);
00086 }
00087
00091 std::string getTopic() const;
00092
00096 std::string getSubscriberName() const;
00097
00098 private:
00099 void publish(const SerializedMessage& m) const;
00100
00101 SubscriberLinkPtr link_;
00102 };
00103
00104 }
00105
00106 #endif // ROSCPP_PUBLISHER_HANDLE_H
00107
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim
autogenerated on Thu Jun 6 2019 21:10:05