GSLAM  3.0.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Publisher Class Reference

Classes

struct  Impl
 

Public Member Functions

 Publisher (const std::string &topic, const Svar &type, size_t queue_size=0)
 
void publish (const Svar &message) const
 Publish a message without a copy!
 
void shutdown ()
 Shutdown the advertisement associated with this Publisher. More...
 
std::string getTopic () const
 Returns the topic that this Publisher will publish on.
 
std::string getTypeName () const
 Returns the topic that this Publisher will publish on.
 
uint32_t getNumSubscribers () const
 Returns the number of subscribers that are currently connected to this Publisher.
 
 operator void * () const
 
bool operator< (const Publisher &rhs) const
 
bool operator== (const Publisher &rhs) const
 
bool operator!= (const Publisher &rhs) const
 

Protected Member Functions

 Publisher (Impl *implement)
 
std::string key () const
 

Protected Attributes

std::shared_ptr< Implimpl_
 

Member Function Documentation

void shutdown ( )

Shutdown the advertisement associated with this Publisher.

This method usually does not need to be explicitly called, as automatic shutdown happens when all copies of this Publisher go out of scope

This method overrides the automatic reference counted unadvertise, and does so immediately.

Note
Note that if multiple advertisements were made through NodeHandle::advertise(), this will only remove the one associated with this Publisher