Lumiera  0.pre.03
»edit your freedom«
GenNodeAccessor< TAR > Struct Template Reference

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

Description

template<typename TAR>
struct lib::meta::anonymous_namespace{tuple-record-init.hpp}::GenNodeAccessor< TAR >

specialised Accessor to retrieve a given target type from a run-time typed, opaque GenNode element. Since GenNode may hold some value from a (lib::diff::DataValues small and fixed selection of types), we prepare a converter function for each sensible conversion path to the given TAR target type. This converter will placement-construct a target value in a buffer reserved within this Accessor object.

Warning
template bloat: we get a converter for each possible conversion for each instantiation of this template, irrespective if we actually need it or not. The price is payed per distinct type used within some target tuple; we get a VTable and some conversion functions for each.

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

Public Types

using ConversionBuffer = InstantiateChained< SupportedSourceTypes, Converter, ConverterBase >
 
using SupportedSourceTypes = typename Filter< DataValues::List, allow_Conversion >::List
 

Public Member Functions

 GenNodeAccessor (GenNode const &node)
 
 ~GenNodeAccessor ()
 
TAR & accessTargetElement ()
 
 operator TAR ()
 

Public Attributes

ConversionBuffer converter_
 

Classes

struct  allow_Conversion
 
class  Converter
 
struct  ConverterBase
 

Additional Inherited Members

- Protected Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Constructor & Destructor Documentation

◆ ~GenNodeAccessor()

~GenNodeAccessor ( )
inline
Note
RAII: when the ctor succeeds, we know the target element was built

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

+ Inheritance diagram for GenNodeAccessor< TAR >:
+ Collaboration diagram for GenNodeAccessor< TAR >:

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