14 #ifndef ECL_SIGSLOTS_SIGNAL_HPP_ 15 #define ECL_SIGSLOTS_SIGNAL_HPP_ 46 template <
typename Data=Vo
id>
61 Signal(
const std::string &topic) : sigslot(NULL) {
79 sigslot->incrHandles();
90 sigslot->decrHandles();
91 if ( sigslot->handles() == 0 ) {
104 void connect(
const std::string& topic) { sigslot->connectSignal(topic); }
113 void connectAsSlot(
const std::string& topic) { sigslot->connectSlot(topic); }
128 void emit(Data data) { sigslot->emit(data); }
163 Signal(
const std::string &topic) : sigslot(NULL) {
180 sigslot->incrHandles();
190 sigslot->decrHandles();
191 if ( sigslot->handles() == 0 ) {
203 void connect(
const std::string& topic) { sigslot->connectSignal(topic); }
212 void connectAsSlot(
const std::string& topic) { sigslot->connectSlot(topic); }
225 void emit() { sigslot->emit(); }
Signal(const Signal &signal)
Copy constructor.
Signal(const std::string &topic)
Creates a signal and connects.
void connectAsSlot(const std::string &topic)
Connect as a slot, with the emit function loaded.
void connectAsSlot(const std::string &topic)
Connect as a slot, with the emit function loaded.
Signal()
Default constructor.
Signal()
Default constructor.
void emit()
The primary purpose of the signal, to emit!
void disconnect()
Disconnect the signal from all topics.
SigSlot< Void > * sigslot
Signal(const std::string &topic)
Creates a signal and connects.
void connect(const std::string &topic)
Make a connection to the specified topic.
Not for direct use, provides the power behind both void signals and slots.
void disconnect()
Disconnect the signal from all topics.
Not for direct use, provides the power behind both signals and slots.
Signalling component of a callback system.
SigSlot< Data > * sigslot
void connect(const std::string &topic)
Make a connection to the specified topic.
~Signal()
Default destructor.
void emit(Data data)
The primary purpose of the signal, to emit!
~Signal()
Default destructor.
Signal(const Signal &signal)
Copy constructor.