The sigslots connection manager. More...
#include <manager.hpp>
Static Public Member Functions | |
static void | printStatistics () |
Print some statistics on the current status of the manager. More... | |
Private Types | |
typedef Topic< Data >::Subscribers | Subscribers |
A list of subscribers (slots) to a given topic. More... | |
Static Private Member Functions | |
static const Subscribers * | connectSignal (const std::string &topic, SigSlot< Data > *sigslot) |
static void | connectSlot (const std::string &topic, SigSlot< Data > *sigslot) |
static void | disconnect (const std::string &topic, SigSlot< Data > *sigslot) |
Disconnect the sigslot from the specified topic. More... | |
static bool | isTopic (const std::string &topic) |
Check to see if the specified topic exists (and is being used). More... | |
static const Subscribers & | subscribers (const std::string &topic) |
Provides a list of subscribers (listeners) associated with a topic. More... | |
static std::map< std::string, Topic< Data > > & | topics () |
Hack to create a static variable internally without. More... | |
Friends | |
class | SigSlot< Data > |
The sigslots connection manager.
This handles all the connections via the unique string identifiers. It does this invisibly, so the programmer need not actually have to use this class. However, it may be useful for debugging to actually check the number of connections with the printStatistics() method.
Data | : the type of sigslots this manager looks after. |
Definition at line 55 of file manager.hpp.
|
private |
A list of subscribers (slots) to a given topic.
Definition at line 85 of file manager.hpp.
|
inlinestaticprivate |
Connects the signal to the topic if it already exists, or creates the topic if it doesn't. Returns the subscriber list which is used by sigslot to bypass the manager when emitting.
topic | : topic to publish to. |
sigslot | : sigslot that will be publishing. |
Definition at line 96 of file manager.hpp.
|
inlinestaticprivate |
Connects the slot to the topic if it already exists, or creates the topic if it doesn't.
topic | : topic to subscribe (listen) to. |
sigslot | : sigslot that will be subscribing (listening). |
Definition at line 115 of file manager.hpp.
|
inlinestaticprivate |
Disconnect the sigslot from the specified topic.
This disconnection works for both signals and slots.
topic | : topic that the sigslot must be disconnected from. |
sigslot | : the sigslots that is to be disconnected. |
Definition at line 134 of file manager.hpp.
|
inlinestaticprivate |
Check to see if the specified topic exists (and is being used).
topic | : topic to check. |
Definition at line 150 of file manager.hpp.
|
inlinestatic |
Print some statistics on the current status of the manager.
Only here for debugging purposes only.
Definition at line 73 of file manager.hpp.
|
inlinestaticprivate |
Provides a list of subscribers (listeners) associated with a topic.
This provides a handle to the list of subscribers to a topic. Used by the signals to keep track of who's following them and who to run when emitting.
topic | : the topic to check for. |
Definition at line 176 of file manager.hpp.
|
inlinestaticprivate |
Hack to create a static variable internally without.
Simple trick to avoid the explicit instantiation in a library.
Definition at line 161 of file manager.hpp.
|
friend |
Definition at line 66 of file manager.hpp.