halcheck 1.0
Loading...
Searching...
No Matches
halcheck::lib::effect::handler< Self, Effects > Class Template Referenceabstract

An effect handler defines the behaviour of a set of effects. More...

#include <effect.hpp>

Public Types

using scope = lib::finally_t<reset>
 A type of object whose lifetime determines how long the set of effect handlers are overriden.
 
using owning_scope = lib::finally_t<owning_reset>
 A type of object whose lifetime determines how long the set of effect handlers are overriden.
 

Public Member Functions

scope handle () &
 Overrides the behaviour of a set of effects.
 
owning_scope handle () &&
 Overrides the behaviour of a set of effects.
 
template<typename F , typename... Args>
lib::invoke_result_t< F, Args... > handle (F func, Args &&...args)
 Invokes a function, handling any effects using this handler.
 

Private Member Functions

virtual lib::effect_result_t< Effect > operator() (Effect args)=0
 

Detailed Description

template<typename Self, typename... Effects>
class halcheck::lib::effect::handler< Self, Effects >

An effect handler defines the behaviour of a set of effects.

Template Parameters
SelfThe derived type (as used in CRTP).
EffectsThe set of effects to handle.

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