Classes | Public Member Functions | Private Attributes | Friends
naoqi::publisher::Publisher Class Reference

Publisher concept interface. More...

#include <publisher.hpp>

List of all members.

Classes

struct  PublisherConcept
struct  PublisherModel

Public Member Functions

bool isInitialized () const
 checks if the publisher is correctly initialized on the ros-master @
bool isSubscribed () const
 checks if the publisher has a subscription and is hence allowed to publish
template<typename T >
 Publisher (const T &pub)
 Constructor for publisher interface.
void reset (ros::NodeHandle &nh)
 initializes/resets the publisher into ROS with a given nodehandle, this will be called at first for initialization or again when master uri has changed
std::string topic () const
 getting the topic to publish on

Private Attributes

boost::shared_ptr
< PublisherConcept
pubPtr_

Friends

bool operator== (const Publisher &lhs, const Publisher &rhs)
bool operator== (const boost::shared_ptr< Publisher > &lhs, const boost::shared_ptr< Publisher > &rhs)

Detailed Description

Publisher concept interface.

Note:
this defines an private concept struct, which each instance has to implement
a type erasure pattern in implemented here to avoid strict inheritance, thus each possible publisher instance has to implement the virtual functions mentioned in the concept

Definition at line 41 of file publisher.hpp.


Constructor & Destructor Documentation

template<typename T >
naoqi::publisher::Publisher::Publisher ( const T pub) [inline]

Constructor for publisher interface.

Definition at line 50 of file publisher.hpp.


Member Function Documentation

checks if the publisher is correctly initialized on the ros-master @

Returns:
bool value indicating true for success

Definition at line 58 of file publisher.hpp.

checks if the publisher has a subscription and is hence allowed to publish

Returns:
bool value indicating true for number of sub > 0

Definition at line 67 of file publisher.hpp.

initializes/resets the publisher into ROS with a given nodehandle, this will be called at first for initialization or again when master uri has changed

Parameters:
rosNodeHandle to advertise the publisher on

Definition at line 77 of file publisher.hpp.

std::string naoqi::publisher::Publisher::topic ( ) const [inline]

getting the topic to publish on

Returns:
string indicating the topic

Definition at line 88 of file publisher.hpp.


Friends And Related Function Documentation

bool operator== ( const Publisher lhs,
const Publisher rhs 
) [friend]

Definition at line 93 of file publisher.hpp.

bool operator== ( const boost::shared_ptr< Publisher > &  lhs,
const boost::shared_ptr< Publisher > &  rhs 
) [friend]

Definition at line 101 of file publisher.hpp.


Member Data Documentation

Definition at line 154 of file publisher.hpp.


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


naoqi_driver
Author(s): Karsten Knese
autogenerated on Tue Jul 9 2019 03:21:56