Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::StaticCallback Struct Reference

Lightweight non-allocating static callback wrapper (function pointer + optional context argument). More...

#include <SignalPolicies.hpp>

+ Collaboration diagram for corium::StaticCallback:

Public Types

using ContextFn = void(*)(void *arg)
 
using SimpleFn = void(*)()
 

Public Member Functions

 operator bool () const noexcept
 
void operator() () const
 
 StaticCallback ()=default
 
 StaticCallback (ContextFn contextFn, void *contextArg)
 
 StaticCallback (SimpleFn simpleFn)
 

Public Attributes

void * arg = nullptr
 
ContextFn fn = nullptr
 

Detailed Description

Lightweight non-allocating static callback wrapper (function pointer + optional context argument).

Member Typedef Documentation

◆ ContextFn

using corium::StaticCallback::ContextFn = void (*)(void* arg)

◆ SimpleFn

Constructor & Destructor Documentation

◆ StaticCallback() [1/3]

corium::StaticCallback::StaticCallback ( )
default

◆ StaticCallback() [2/3]

corium::StaticCallback::StaticCallback ( SimpleFn  simpleFn)
inline

◆ StaticCallback() [3/3]

corium::StaticCallback::StaticCallback ( ContextFn  contextFn,
void *  contextArg 
)
inline

Member Function Documentation

◆ operator bool()

corium::StaticCallback::operator bool ( ) const
inlineexplicitnoexcept

◆ operator()()

void corium::StaticCallback::operator() ( ) const
inline

Member Data Documentation

◆ arg

void* corium::StaticCallback::arg = nullptr

◆ fn

ContextFn corium::StaticCallback::fn = nullptr

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