mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
Make CallbackManager invocable (#3089)
This commit is contained in:
parent
80d03a631e
commit
4e6bdb31ac
1 changed files with 3 additions and 0 deletions
|
@ -176,6 +176,9 @@ template<typename... Ts> class CallbackManager<void(Ts...)> {
|
||||||
cb(args...);
|
cb(args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Call all callbacks in this manager.
|
||||||
|
void operator()(Ts... args) { call(args...); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::vector<std::function<void(Ts...)>> callbacks_;
|
std::vector<std::function<void(Ts...)>> callbacks_;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue