$darkmode
cloe::DirectCallback< E, Ctx > Class Template Reference

#include <registrar.hpp>

Inheritance diagram for cloe::DirectCallback< E, Ctx >:
Collaboration diagram for cloe::DirectCallback< E, Ctx >:

Public Member Functions

size_t size () const
 
bool empty () const
 
void emplace (TriggerPtr &&t, const Sync &) override
 
void to_json (fable::Json &j) const override
 
void trigger (const Sync &sync, const Ctx &... args)
 
- Public Member Functions inherited from cloe::Callback
void set_executer (CallbackExecuter exe)
 

Additional Inherited Members

- Protected Member Functions inherited from cloe::Callback
CallbackResult execute (TriggerPtr &&t, const Sync &s)
 

Detailed Description

template<typename E, typename... Ctx>
class cloe::DirectCallback< E, Ctx >

The DirectCallback class is a container for triggers that fulfills the Callback interface and is sufficient for 90% of all callback implementations.

This can be returned by the Registrar::register_event method and should be stored in the class responsible for triggering the event.

Member Function Documentation

◆ emplace()

template<typename E , typename... Ctx>
void cloe::DirectCallback< E, Ctx >::emplace ( TriggerPtr &&  t,
const Sync s 
)
inlineoverridevirtual

Place a trigger within the callback for storage.

Implements cloe::Callback.

◆ to_json()

template<typename E , typename... Ctx>
void cloe::DirectCallback< E, Ctx >::to_json ( fable::Json j) const
inlineoverridevirtual

Return JSON representation of all contained triggers.

Implements cloe::Callback.


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