#include <signal.h>
Public Types | |
using | CallableFunction = std::function< void(CallableArgs...)> |
using | Subscriber = std::shared_ptr< CallableFunction > |
Public Member Functions | |
void | notify (CallableArgs... args) |
Subscriber | subscribe (CallableFunction func) |
Private Attributes | |
std::vector< std::weak_ptr< CallableFunction > > | subscribers_ |
Super simple Signal/Slop implementation, AKA "Observable pattern". The subscriber is active until it goes out of scope or Subscriber::reset() is called.
using BT::Signal< CallableArgs >::CallableFunction = std::function<void(CallableArgs...)> |
using BT::Signal< CallableArgs >::Subscriber = std::shared_ptr<CallableFunction> |
|
inline |
|
inline |
|
private |