Lumiera  0.pre.03
»edit your freedom«
ElementExtractor< lib::diff::Rec, std::tuple< TYPES... > > Struct Template Reference

#include "lib/meta/tuple-record-init.hpp"

Description

template<typename... TYPES>
struct lib::meta::ElementExtractor< lib::diff::Rec, std::tuple< TYPES... > >

Concrete specialisation to build a std::tuple from a sequence of GenNode elements, with run-time type compatibility check.

Remarks
intention is to use this within (TupleConstructor), as will happen automatically when invoking (buildTuple() ) with a Record<GenNode> as argument. The embedded template Access<i> will be initialised with (a reference) to the source record, followed by an attempt to convert it to the individual member type at position i within the target tuple.
Exceptions
error::Invalidwhen the number of types within the target exceeds the number of children within the source record. LUMIERA_ERROR_INDEX_BOUNDS
error::Invalidwhen some source GenNode element can not be sensibly converted to the corresponding type in the target tuple. LUMIERA_ERROR_WRONG_TYPE

Definition at line 195 of file tuple-record-init.hpp.

Public Types

template<size_t i>
using TargetType = typename Pick< Types< TYPES... >, i >::Type
 

Classes

struct  Access
 

Member Typedef Documentation

◆ TargetType

using TargetType = typename Pick<Types<TYPES...>, i>::Type

Definition at line 198 of file tuple-record-init.hpp.

+ Collaboration diagram for ElementExtractor< lib::diff::Rec, std::tuple< TYPES... > >:

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