Classes |
| struct | Info |
Public Member Functions |
| | SignalRegistryBase () |
| | SignalRegistryBase (SignalRegistryBase &inheritFrom) |
| size_t | size () const |
| template<typename Class > |
| SlotDisconnector | on (const std::string &name, Class *object, const Slot &slot, int priority=0) const |
| std::vector< std::string > | names () const |
| SignalInfo | info (const std::string &name) const |
| void | inheritSignals (SignalRegistryBase &inheritFrom) |
Protected Types |
| typedef SlotDisconnector(* | RegisterFn )(void *thisPtr, const std::type_info &thisType, const std::string &name, const Slot &slotToRegister, int priority, void *data) |
typedef std::unordered_map
< std::string, Info > | Signals |
| typedef void( | NewEvent )(const SignalRegistryBase &, const Info &) |
Protected Member Functions |
| SlotDisconnector | doOn (const std::string &name, void *object, const std::type_info &objectType, const Slot &slot, int priority) const |
| void | add (const std::string &eventName, const std::type_info &callbackType, const std::type_info &objectType, RegisterFn registerFn, void *data=0) |
| void | addSignal (const Info &signal, bool inherited) |
Protected Attributes |
|
Signals | signals |
| | The set of signals.
|
| boost::signals2::signal< NewEvent > | newEvent |
std::vector
< boost::signals2::connection > | parentRegistrations |
Base class that handles the type-independent (non templated) parts of the signal registration.
Definition at line 52 of file signal.h.
Callback function to register a callback of a given type with a given function.
The void * is actually the this pointer for the owning class. The passed-in thisType parameter gives the type info node for the actual class that this is. Doing things this way allows us to use the internal compiler exception handling machinery to deal with different object types at run-time without requiring anything like a common base class, etc.
The return value should provide a boost::function that can be used to disconnect the slot.
Definition at line 110 of file signal.h.