ecl::Topic< Data > Class Template Reference
Stores publisher and subscriber lists to a uniquely string identified topic.
More...
#include <topic.hpp>
List of all members.
Detailed Description
template<typename Data>
class ecl::Topic< Data >
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.
Definition at line 45 of file topic.hpp.
Member Typedef Documentation
A list of subscribers (slots) to a given topic.
Definition at line 50 of file topic.hpp.
Constructor & Destructor Documentation
Uniquely construct with the specified name.
- Parameters:
-
| name | : name of the topic. |
Definition at line 56 of file topic.hpp.
Member Function Documentation
Add a publisher.
- Parameters:
-
| sigslot | : the sigslot to add. |
Definition at line 75 of file topic.hpp.
Add a subscriber.
- Parameters:
-
| sigslot | : the sigslot to add. |
Definition at line 68 of file topic.hpp.
Disconnect a sigslot.
This parses both publishers and subscribers looking for the sigslot to connect. Could be a bit heavy doing it this way, but its convenient.
- Parameters:
-
| sigslot | : the sigslot to disconnect. |
Definition at line 86 of file topic.hpp.
Checks to see if there is no publishers/subscribers.
This is used to delete the topic (by the manager) if it is empty.
- Returns:
- bool : empty (true) or not (false).
Definition at line 102 of file topic.hpp.
List of subscribers (listeners) to a topic.
- Returns:
- Subscribers : handle to the list.
Definition at line 62 of file topic.hpp.
Friends And Related Function Documentation
template<typename Data>
template<typename OutputStream , typename TopicData >
OutputStream& operator<< |
( |
OutputStream & |
ostream, |
|
|
const Topic< TopicData > & |
topic | |
|
) |
| | [friend] |
Insertion operator for sending the topic to an output stream.
- Parameters:
-
| ostream | : the output stream. |
| topic | : the topic to be inserted. |
- Returns:
- OutputStream : continue streaming with the updated output stream.
Definition at line 130 of file topic.hpp.
Member Data Documentation
The documentation for this class was generated from the following file: