Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/meta/tuple-helper.hpp"
Decorating a tuple type with auxiliary data access operations.
This helper template builds up a subclass of the given TUP (base) type (which is assumed to be a Tuple or at least need to be copy constructible from Tuple<TYPES>
). The purpose is to use the Tuple as storage record, but to add a layer of access functions, which in turn might rely on the exact type of the individual elements within the Tuple. To achieve this, for each type within the Tuple, the TUP type is decorated with an instance of the template passed in as template template parameter X. Each of these decorating instances is provided with an index number, allowing to access "his" specific element within the underlying tuple.
The decorating template X need to take its own base class as template parameter. Typically, operations on X will be defined in a recursive fashion, calling down into this templated base class. To support this, an instantiation of X with the empty type sequence is generated for detecting recursion end (built as innermost decorator, i.e. the immediate subclass of TUP)
Definition at line 322 of file tuple-helper.hpp.
Public Types | |
using | Product = _X_< Head, NextAccessor, TUP, i > |
type of the product created by this template. More... | |
Private Types | |
using | Head = typename Split< TYPES >::Head |
using | NextAccessor = typename NextBuilder::Product |
using | NextBuilder = BuildTupleAccessor< _X_, Tail, TUP, i+1 > |
using | Tail = typename Split< TYPES >::Tail |
using Product = _X_< Head , NextAccessor , TUP , i > |
type of the product created by this template.
Will be a subclass of TUP
Definition at line 337 of file tuple-helper.hpp.