mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
mrs_lib::PublisherHandler_impl< TopicType > Class Template Reference

implementation of the publisher handler More...

#include <publisher_handler.h>

Public Member Functions

 PublisherHandler_impl (void)
 default constructor
 ~PublisherHandler_impl (void)
 default destructor
 PublisherHandler_impl (const PublisherHandlerOptions &options, const std::string &address)
 full constructor with options
void publish (const TopicType &msg)
 publish message
void publish (const std::shared_ptr< TopicType > &msg)
 publish message, boost ptr overload
void publish (typename TopicType::ConstSharedPtr msg)
 publish message, boost const ptr overload
void publish (std::unique_ptr< TopicType > msg)
 publish message, unique_ptr overload
unsigned int getNumSubscribers (void)
 get number of subscribers

Detailed Description

template<class TopicType>
class mrs_lib::PublisherHandler_impl< TopicType >

implementation of the publisher handler

Constructor & Destructor Documentation

◆ PublisherHandler_impl()

template<class TopicType>
mrs_lib::PublisherHandler_impl< TopicType >::PublisherHandler_impl ( const PublisherHandlerOptions & options,
const std::string & address )

full constructor with options

Parameters
optionssubscribe handler options
addresstopic address

Member Function Documentation

◆ getNumSubscribers()

template<class TopicType>
unsigned int mrs_lib::PublisherHandler_impl< TopicType >::getNumSubscribers ( void )

get number of subscribers

Returns
the number of subscribers

◆ publish() [1/4]

template<class TopicType>
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( const std::shared_ptr< TopicType > & msg)

publish message, boost ptr overload

Parameters
msgmessage

◆ publish() [2/4]

template<class TopicType>
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( const TopicType & msg)

publish message

Parameters
msgdata

◆ publish() [3/4]

template<class TopicType>
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( std::unique_ptr< TopicType > msg)

publish message, unique_ptr overload

Parameters
msgmessage

◆ publish() [4/4]

template<class TopicType>
void mrs_lib::PublisherHandler_impl< TopicType >::publish ( typename TopicType::ConstSharedPtr msg)

publish message, boost const ptr overload

Parameters
msgmessage

publish message, boost const ptr overload

Parameters
msgmessage

The documentation for this class was generated from the following files: