Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
TrojanFun< SIG > Class Template Reference

#include "lib/lazy-init.hpp"

Description

template<class SIG>
class lib::TrojanFun< SIG >

»Trojan Function« builder.

Generates a Lambda to invoke a delegate for the actual computation. On invocation, the current storage location of the λ is determined.

Definition at line 149 of file lazy-init.hpp.

Static Public Member Functions

template<class DEL >
static auto generateTrap (DEL *delegate)
 Invocation: build a Lambda to activate the »Trap« and then to forward the invocation to the actual function, which should have been initialised by the delegate invoked.
 

Static Private Member Functions

template<class DEL , typename RET , typename... ARGS>
static auto buildTrapActivator (DEL *delegate, _Fun< RET(ARGS...)>)
 

Member Function Documentation

◆ buildTrapActivator()

template<class SIG >
template<class DEL , typename RET , typename... ARGS>
static auto buildTrapActivator ( DEL *  delegate,
_Fun< RET(ARGS...)>   
)
inlinestaticprivate

Definition at line 153 of file lazy-init.hpp.

Referenced by TrojanFun< SIG >::generateTrap().

+ Here is the caller graph for this function:

◆ generateTrap()

template<class SIG >
template<class DEL >
static auto generateTrap ( DEL *  delegate)
inlinestatic

Invocation: build a Lambda to activate the »Trap« and then to forward the invocation to the actual function, which should have been initialised by the delegate invoked.

Parameters
delegatea functor object to forward invocation; the delegate must return a reference to the actual function implementation to invoke. Must be heap-allocated.
Returns
a lightweight lambda usable as trigger.

Definition at line 179 of file lazy-init.hpp.

References TrojanFun< SIG >::buildTrapActivator().

Referenced by LazyInit< PAR >::prepareInitialiser(), and LazyInit_test::verify_trojanLambda().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Collaboration diagram for TrojanFun< SIG >:

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