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.

◆ Dispatch()

template<class Fn>
template<class Visit>
bool VoltMod::CallbackList< Fn >::Dispatch ( Visit && visit)
inline

Invoke visit(callback, context) until one returns true; returns whether one did.

Definition at line 69 of file CallbackList.hpp.

Referenced by VoltMod::RaiseCommand().

◆ 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 76 of file CallbackList.hpp.

◆ 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.

◆ Remove()

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

Whether token was taken on this event.

Definition at line 40 of file CallbackList.hpp.


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