VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::CallbackList< Fn > Class Template Reference

#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)
 

Detailed Description

template<class Fn>
class VoltMod::CallbackList< Fn >

Definition at line 20 of file CallbackList.hpp.

Member Function Documentation

◆ Add()

template<class Fn >
void VoltMod::CallbackList< Fn >::Add ( uint64_t  token,
uint64_t  order,
Fn  callback,
void *  context 
)
inline

Definition at line 23 of file CallbackList.hpp.

References VoltMod::ReadFile().

◆ Dispatch()

◆ DispatchTo()

template<class Fn >
template<class Visit >
void VoltMod::CallbackList< Fn >::DispatchTo ( uint64_t  order,
Visit &&  visit 
)
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().

◆ Empty()

template<class Fn >
bool VoltMod::CallbackList< Fn >::Empty ( ) const
inline

Whether nothing is subscribed, counting additions still waiting aside.

Definition at line 37 of file CallbackList.hpp.

Referenced by VoltMod::PluginRegistry::HasCommandListeners().

◆ Remove()

template<class Fn >
bool VoltMod::CallbackList< Fn >::Remove ( uint64_t  token)
inline

Whether token was taken on this event.

Definition at line 43 of file CallbackList.hpp.

References VoltMod::ReadFile().


The documentation for this class was generated from the following file: