Stores publisher and subscriber lists to a uniquely string identified topic. More...
#include <topic.hpp>
Public Types | |
typedef std::set< SigSlot < Data > * > | Subscribers |
A list of subscribers (slots) to a given topic. | |
Public Member Functions | |
void | addPublisher (SigSlot< Data > *sigslot) |
Add a publisher. | |
void | addSubscriber (SigSlot< Data > *sigslot) |
Add a subscriber. | |
void | disconnect (SigSlot< Data > *sigslot) |
Disconnect a sigslot. | |
bool | empty () const |
Checks to see if there is no publishers/subscribers. | |
const Subscribers * | subscribers () const |
List of subscribers (listeners) to a topic. | |
Topic (const std::string &name) | |
Uniquely construct with the specified name. | |
Private Attributes | |
std::string | topic_name |
std::set< SigSlot< Data > * > | topic_publishers |
std::set< SigSlot< Data > * > | topic_subscribers |
Friends | |
template<typename OutputStream , typename TopicData > | |
OutputStream & | operator<< (OutputStream &ostream, const Topic< TopicData > &topic) |
Stores publisher and subscriber lists to a uniquely string identified topic.
This is not for direct use, its the storage container for the sigslots manager.
typedef std::set<SigSlot<Data>*> ecl::Topic< Data >::Subscribers |
ecl::Topic< Data >::Topic | ( | const std::string & | name | ) | [inline] |
void ecl::Topic< Data >::addPublisher | ( | SigSlot< Data > * | sigslot | ) | [inline] |
void ecl::Topic< Data >::addSubscriber | ( | SigSlot< Data > * | sigslot | ) | [inline] |
void ecl::Topic< Data >::disconnect | ( | SigSlot< Data > * | sigslot | ) | [inline] |
bool ecl::Topic< Data >::empty | ( | ) | const [inline] |
const Subscribers* ecl::Topic< Data >::subscribers | ( | ) | const [inline] |
OutputStream& operator<< | ( | OutputStream & | ostream, |
const Topic< TopicData > & | topic | ||
) | [friend] |
std::string ecl::Topic< Data >::topic_name [private] |
std::set<SigSlot<Data>*> ecl::Topic< Data >::topic_publishers [private] |
std::set<SigSlot<Data>*> ecl::Topic< Data >::topic_subscribers [private] |