ESPHome
2024.11.3
|
Helper class to allow having multiple subscribers to a callback. More...
#include <helpers.h>
Public Member Functions | |
void | add (std::function< void(Ts...)> &&callback) |
Add a callback to the list. More... | |
void | call (Ts... args) |
Call all callbacks in this manager. More... | |
size_t | size () const |
void | operator() (Ts... args) |
Call all callbacks in this manager. More... | |
Protected Attributes | |
std::vector< std::function< void(Ts...)> > | callbacks_ |
Helper class to allow having multiple subscribers to a callback.
Ts | The arguments for the callbacks, wrapped in void(). |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |