|
VoltMod
C++23 framework for CS2 server plugins
|
Starting and stopping an Event source, driven by whether anything is listening. More...
#include <Event.hpp>
Public Attributes | |
| std::function< bool()> | OnFirst |
| std::function< void()> | OnLast |
Starting and stopping an Event source, driven by whether anything is listening.
OnFirst runs before the first handler is stored; false refuses the subscription, and the owner is expected to have said why. OnLast runs after the last handler is removed. Both run on the game thread, and OnLast may run from inside Event::Raise when the last handler drops itself.
| std::function<bool()> VoltMod::EventLifecycle::OnFirst |
Definition at line 23 of file Event.hpp.
Referenced by VoltMod::LazyHook::ForEvent(), and VoltMod::Event< Args >::operator+=().
| std::function<void()> VoltMod::EventLifecycle::OnLast |
Definition at line 24 of file Event.hpp.
Referenced by VoltMod::Event< Args >::operator+=().