Specialised slot that handles void callbacks. More...
#include <slot.hpp>
Public Member Functions | |
void | connect (const std::string &topic) |
Make a connection to the specified topic. | |
void | disconnect () |
Disconnect the slot from all topics. | |
Slot (VoidFunction f) | |
Load with a global/static function. | |
Slot (VoidFunction f, const std::string &topic) | |
Load with a global/static function and connect. | |
template<typename C > | |
Slot (void(C::*f)(void), C &c) | |
Load with a member function. | |
template<typename C > | |
Slot (void(C::*f)(void), C &c, const std::string &topic) | |
Load with a member function and connect. | |
Slot (const Slot &slot) | |
Copy constructor. | |
~Slot () | |
Default destructor. | |
Private Attributes | |
SigSlot< Void > * | sigslot |
Specialised slot that handles void callbacks.
Specialised signal that works with void function callbacks.
Usage examples are provided in the main page's documentation for this package.
ecl::Slot< Void >::Slot | ( | VoidFunction | f | ) | [inline] |
ecl::Slot< Void >::Slot | ( | VoidFunction | f, |
const std::string & | topic | ||
) | [inline] |
Copy constructor.
This is specially designed so that copying a slot is perfectly acceptable. Copies do not increase the number of callbacks that are fired - they just preserve the slot when used with things like stl containers. When the last copy disappears, the object destroys its connection automagically.
slot | : the object to be copied. |
void ecl::Slot< Void >::disconnect | ( | ) | [inline] |