52template <
class... Args>
void Dispatch(std::invocable< T & > auto &&fn)
A multicast signal with a fixed handler signature: the one way to subscribe in VoltMod.
Subscription operator+=(Handler handler)
size_t Count() const noexcept
Event(const Event &)=delete
std::function< void(Args...)> Handler
Event(Lifecycle lifecycle)
bool Empty() const noexcept
Event & operator=(const Event &)=delete
Owns one registration and releases it on destruction.
static std::string ReadFile(const std::filesystem::path &path)
Starting and stopping an Event source, driven by whether anything is listening.
std::function< bool()> OnFirst
std::function< void()> OnLast