Lumiera  0.pre.03
»edit your freedom«
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 158 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. More...
 

Static Private Member Functions

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

Member Function Documentation

◆ generateTrap()

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 188 of file lazy-init.hpp.

Referenced by LazyInit< NodeControlBinding >::LazyInit().

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

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