Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize > Class Template Reference

Fixed-capacity stack-allocated list of event handlers for a single event type. More...

#include <Reactor.hpp>

+ Collaboration diagram for corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize >:

Public Member Functions

void dispatch (const EventType &event) const
 
 FixedHandlerList ()=default
 
template<typename Handler >
bool registerHandler (Handler &&handler)
 
size_t size () const noexcept
 

Detailed Description

template<typename EventType, size_t MaxHandlers, size_t InlineSize>
class corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize >

Fixed-capacity stack-allocated list of event handlers for a single event type.

Template Parameters
EventTypeEvent type handled.
MaxHandlersMaximum number of handlers allowed for this event type.
InlineSizeMax payload size in bytes for handler inline storage.

Constructor & Destructor Documentation

◆ FixedHandlerList()

template<typename EventType , size_t MaxHandlers, size_t InlineSize>
corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize >::FixedHandlerList ( )
default

Member Function Documentation

◆ dispatch()

template<typename EventType , size_t MaxHandlers, size_t InlineSize>
void corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize >::dispatch ( const EventType &  event) const
inline

◆ registerHandler()

template<typename EventType , size_t MaxHandlers, size_t InlineSize>
template<typename Handler >
bool corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize >::registerHandler ( Handler &&  handler)
inline

◆ size()

template<typename EventType , size_t MaxHandlers, size_t InlineSize>
size_t corium::internal::FixedHandlerList< EventType, MaxHandlers, InlineSize >::size ( ) const
inlinenoexcept

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