|
VoltMod
C++23 framework for CS2 server plugins
|
A hook before-handler's verdict. More...
#include <HookResult.hpp>
Public Member Functions | |
| HookResult ()=default | |
| HookAction | Action () const noexcept |
| const Ret & | Value () const &noexcept |
| Ret | Value () && |
Static Public Member Functions | |
| static HookResult | Replace (Ret value) |
| static HookResult | Block (Ret value) |
A hook before-handler's verdict.
Default-constructs to HookAction::Allow, so return {}; passes the call through. A handler that returns nothing at all is treated the same way.
Names no hooking machinery, so a header may return one without reaching <VoltMod/Unsafe/Hook.hpp>.
Definition at line 28 of file HookResult.hpp.
|
default |
Referenced by VoltMod::HookResult< void >::Block().
|
inlinenoexcept |
Definition at line 42 of file HookResult.hpp.
|
inlinestatic |
Do not run the original at all; return value instead.
Definition at line 40 of file HookResult.hpp.
References VoltMod::Block.
Referenced by VoltMod::AdmitClient(), VoltMod::FilterTextMessage(), and VoltMod::RunCommand().
|
inlinestatic |
Run the original, then return value rather than what it produced.
Definition at line 37 of file HookResult.hpp.
References VoltMod::Replace.
|
inline |
Definition at line 46 of file HookResult.hpp.
Meaningless unless Action is Replace or Block.
Definition at line 45 of file HookResult.hpp.