|
VoltMod
C++23 framework for CS2 server plugins
|
#include <CallbackList.hpp>
Public Member Functions | |
| void | Add (uint64_t token, uint64_t order, Fn callback, void *context) |
| bool | Empty () const |
| bool | Remove (uint64_t token) |
| template<class Visit > | |
| bool | Dispatch (Visit &&visit) |
| template<class Visit > | |
| void | DispatchTo (uint64_t order, Visit &&visit) |
Definition at line 20 of file CallbackList.hpp.
|
inline |
Definition at line 23 of file CallbackList.hpp.
References VoltMod::ReadFile().
|
inline |
Invoke visit(callback, context) until one returns true; returns whether one did.
Definition at line 72 of file CallbackList.hpp.
References VoltMod::ReadFile().
Referenced by VoltMod::PluginRegistry::RaiseBuildGameSessionManifest(), VoltMod::PluginRegistry::RaiseButtonPress(), VoltMod::PluginRegistry::RaiseCheckTransmit(), VoltMod::PluginRegistry::RaiseClientConnected(), VoltMod::PluginRegistry::RaiseClientConnecting(), VoltMod::PluginRegistry::RaiseClientDisconnected(), VoltMod::PluginRegistry::RaiseClientFullyConnected(), VoltMod::PluginRegistry::RaiseClientSettingsChanged(), VoltMod::PluginRegistry::RaiseConsoleCommand(), VoltMod::PluginRegistry::RaiseFrame(), and VoltMod::PluginRegistry::RaiseServerStartup().
|
inline |
Invoke visit(callback, context) over one plugin's callbacks: those added with order.
Definition at line 79 of file CallbackList.hpp.
References VoltMod::ReadFile().
Referenced by VoltMod::PluginContext::DisconnectClients(), and VoltMod::PluginContext::ReplayMissedEvents().
|
inline |
Whether nothing is subscribed, counting additions still waiting aside.
Definition at line 37 of file CallbackList.hpp.
Referenced by VoltMod::PluginRegistry::HasCommandListeners().
Whether token was taken on this event.
Definition at line 43 of file CallbackList.hpp.
References VoltMod::ReadFile().