Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
ParamBuildSpec< ANCH, FUNZ > Struct Template Reference

#include "steam/engine/param-weaving-pattern.hpp"

Description

template<class ANCH, typename... FUNZ>
struct steam::engine::ParamBuildSpec< ANCH, FUNZ >

Specification record for the setup of a »Param Agent Node«.

Template Parameters
ANCHthe lib::HeteroData prefix-chain to use as anchor point
FUNZa set of parameter-functors used to generate additional parameter values.
Note
This template provides a builder-DSL notation, starting with the free function buildParamSpec(). Further parameter «slots» can be added step by step.
Remarks
use the nested Accessor records to retrieve the generated parameter values and use the nested BlockBuilder as a »Prototype« in the ParamWeavingPattern, which actually can be configured through the NodeBuilder...

Definition at line 140 of file param-weaving-pattern.hpp.

Classes

struct  Accessor
 a (static) getter functor able to work on the full extended HeteroData-Chain More...
 
class  BlockBuilder
 

Public Types

using Functors = tuple< FUNZ... >
 
using ResTypes = ElmTypes< Functors >::template Apply< lib::meta::_FunRet >
 
using ParamTup = Tuple< ResTypes >
 
using ChainCons = lib::meta::RebindVariadic< ANCH::template Chain, ParamTup >::Type
 

Public Attributes

Functors functors_
 

Public Member Functions

 ParamBuildSpec (Functors &&funz)
 
ParamBuildSpec clone ()
 can be copied if all functors are copyable...
 
template<typename FUN >
auto addSlot (FUN &&paramFun)
 
template<typename PAR >
auto addValSlot (PAR paramVal)
 
template<size_t slot>
auto invokeParamFun (TurnoutSystem &turnoutSys)
 intended for unit-testing: invoke one of the embedded param-functors
 
template<size_t idx>
Accessor< idx > makeAccessor ()
 
BlockBuilder makeBlockBuilder ()
 Terminal Builder: (destructively) transform this ParamBuildSpec into a BlockBuilder, which can then be used to create a Parameter data block, thereby invoking the embedded functors to drop-off the results into storage.
 

Constructor & Destructor Documentation

◆ ParamBuildSpec()

template<class ANCH , typename... FUNZ>
ParamBuildSpec ( Functors &&  funz)
inline

Definition at line 149 of file param-weaving-pattern.hpp.

Member Typedef Documentation

◆ Functors

template<class ANCH , typename... FUNZ>
using Functors = tuple<FUNZ...>

Definition at line 142 of file param-weaving-pattern.hpp.

◆ ResTypes

template<class ANCH , typename... FUNZ>
using ResTypes = ElmTypes<Functors>::template Apply<lib::meta::_FunRet>

Definition at line 144 of file param-weaving-pattern.hpp.

◆ ParamTup

template<class ANCH , typename... FUNZ>
using ParamTup = Tuple<ResTypes>

Definition at line 145 of file param-weaving-pattern.hpp.

◆ ChainCons

template<class ANCH , typename... FUNZ>
using ChainCons = lib::meta::RebindVariadic<ANCH::template Chain, ParamTup>::Type

the chain constructor type is a type rebinding meta function (nested struct), which extends the HeteroData chain given by ANCH with the sequence of types derived from the result-values of all functors stored in the ParamBuildSpec, i.e. the resulting param tuple.

Remarks
HeteroData defines a nested struct Chain, and with the help of RebindVariadic, the type sequence from the ParamTup can be used to instantiate this chain constructor.

Definition at line 188 of file param-weaving-pattern.hpp.

Member Function Documentation

◆ clone()

template<class ANCH , typename... FUNZ>
ParamBuildSpec clone ( )
inline

can be copied if all functors are copyable...

Definition at line 154 of file param-weaving-pattern.hpp.

◆ addSlot()

template<class ANCH , typename... FUNZ>
template<typename FUN >
auto addSlot ( FUN &&  paramFun)
inline

Definition at line 159 of file param-weaving-pattern.hpp.

References ParamBuildSpec< ANCH, FUNZ >::functors_.

Referenced by ParamBuildSpec< ANCH, FUNZ >::addValSlot().

+ Here is the caller graph for this function:

◆ addValSlot()

template<class ANCH , typename... FUNZ>
template<typename PAR >
auto addValSlot ( PAR  paramVal)
inline

Definition at line 168 of file param-weaving-pattern.hpp.

References ParamBuildSpec< ANCH, FUNZ >::addSlot().

+ Here is the call graph for this function:

◆ invokeParamFun()

template<class ANCH , typename... FUNZ>
template<size_t slot>
auto invokeParamFun ( TurnoutSystem turnoutSys)
inline

intended for unit-testing: invoke one of the embedded param-functors

Definition at line 177 of file param-weaving-pattern.hpp.

References ParamBuildSpec< ANCH, FUNZ >::functors_.

◆ makeAccessor()

template<class ANCH , typename... FUNZ>
template<size_t idx>
Accessor< idx > makeAccessor ( )
inline

Definition at line 206 of file param-weaving-pattern.hpp.

◆ makeBlockBuilder()

template<class ANCH , typename... FUNZ>
BlockBuilder makeBlockBuilder ( )
inline

Terminal Builder: (destructively) transform this ParamBuildSpec into a BlockBuilder, which can then be used to create a Parameter data block, thereby invoking the embedded functors to drop-off the results into storage.

Definition at line 259 of file param-weaving-pattern.hpp.

References ParamBuildSpec< ANCH, FUNZ >::functors_.

Member Data Documentation

◆ functors_

+ Collaboration diagram for ParamBuildSpec< ANCH, FUNZ >:

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