Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
BuildTupleAccessor< _X_, TYPES, TUP, i > Class Template Reference

#include "lib/meta/tuple-helper.hpp"

Description

template<template< class, class, class, uint > class _X_, typename TYPES, class TUP = Tuple<TYPES>, uint i = 0>
class lib::meta::BuildTupleAccessor< _X_, TYPES, TUP, i >

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 489 of file tuple-helper.hpp.

Public Types

using Product = _X_< Head, NextAccessor, TUP, i >
 type of the product created by this template.
 

Private Types

using Head = Split< TYPES >::Head
 
using Tail = Split< TYPES >::Tail
 
using NextBuilder = BuildTupleAccessor< _X_, Tail, TUP, i+1 >
 
using NextAccessor = NextBuilder::Product
 

Member Typedef Documentation

◆ Head

template<template< class, class, class, uint > class _X_, typename TYPES , class TUP = Tuple<TYPES>, uint i = 0>
using Head = Split<TYPES>::Head
private

Definition at line 492 of file tuple-helper.hpp.

◆ Tail

template<template< class, class, class, uint > class _X_, typename TYPES , class TUP = Tuple<TYPES>, uint i = 0>
using Tail = Split<TYPES>::Tail
private

Definition at line 493 of file tuple-helper.hpp.

◆ NextBuilder

template<template< class, class, class, uint > class _X_, typename TYPES , class TUP = Tuple<TYPES>, uint i = 0>
using NextBuilder = BuildTupleAccessor<_X_, Tail,TUP, i+1>
private

Definition at line 494 of file tuple-helper.hpp.

◆ NextAccessor

template<template< class, class, class, uint > class _X_, typename TYPES , class TUP = Tuple<TYPES>, uint i = 0>
using NextAccessor = NextBuilder::Product
private

Definition at line 495 of file tuple-helper.hpp.

◆ Product

template<template< class, class, class, uint > class _X_, typename TYPES , class TUP = Tuple<TYPES>, uint i = 0>
using Product = _X_< Head , NextAccessor , TUP , i >

type of the product created by this template.

Will be a subclass of TUP

Definition at line 500 of file tuple-helper.hpp.

+ Collaboration diagram for BuildTupleAccessor< _X_, TYPES, TUP, i >:

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