18#ifndef _PUBLICATIONTRANSPORT_HH_
19#define _PUBLICATIONTRANSPORT_HH_
21#include <boost/function.hpp>
22#include <boost/shared_ptr.hpp>
41 public boost::enable_shared_from_this<PublicationTransport>
47 const std::string &_msgType);
64 const boost::function<
void(
const std::string &)> &_cb);
80 private:
void OnPublish(
const std::string &_data);
83 private: std::string topic;
86 private: std::string msgType;
92 private: boost::function<void (
const std::string &)> callback;
95 private:
static int counter;
transport
Definition ConnectionManager.hh:35
transport/transport.hh
Definition PublicationTransport.hh:42
void Fini()
Finalize the transport.
const ConnectionPtr GetConnection() const
Get the underlying connection.
void Init(const ConnectionPtr &_conn, bool _latched)
Initialize the transport.
virtual ~PublicationTransport()
Destructor.
PublicationTransport(const std::string &_topic, const std::string &_msgType)
Constructor.
std::string GetMsgType() const
Get the topic type.
void AddCallback(const boost::function< void(const std::string &)> &_cb)
Add a callback to the transport.
std::string GetTopic() const
Get the topic name.
boost::shared_ptr< Connection > ConnectionPtr
Definition Connection.hh:54
Forward declarations for the common classes.
Definition Animation.hh:27