|
ESPHome 2025.12.0-dev
|
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. | |
| void | call (Ts... args) |
| Call all callbacks in this manager. | |
| size_t | size () const |
| void | operator() (Ts... args) |
| Call all callbacks in this manager. | |
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 |