14 #ifndef ECL_SIGSLOTS_SLOT_HPP_
15 #define ECL_SIGSLOTS_SLOT_HPP_
47 template <
typename Data=Vo
id>
58 Slot(
void (*f)(Data)) : sigslot(NULL) {
59 sigslot =
new SigSlot<Data>(f);
72 Slot(
void (*f)(Data),
const std::string &topic) : sigslot(NULL) {
87 Slot(
void (C::*f)(Data), C &c) : sigslot(NULL) {
102 template <
typename C>
103 Slot(
void (C::*f)(Data), C &c,
const std::string& topic) : sigslot(NULL) {
119 Slot(
const Slot& slot) {
121 sigslot->incrHandles();
132 sigslot->decrHandles();
133 if ( sigslot->handles() == 0 ) {
143 const std::set<std::string>& connections() {
return sigslot->subscribedTopics(); }
152 void connect(
const std::string& topic) { sigslot->connectSlot(topic); }
158 void disconnect() { sigslot->disconnect(); }
161 SigSlot<Data>* sigslot;
212 template <
typename C>
213 Slot(
void (C::*
f)(
void), C &c) : sigslot(NULL) {
226 template <
typename C>
227 Slot(
void (C::*
f)(
void), C &c,
const std::string &topic) : sigslot(NULL) {
244 sigslot->incrHandles();
254 sigslot->decrHandles();
255 if ( sigslot->handles() == 0 ) {
267 void connect(
const std::string& topic) { sigslot->connectSlot(topic); }