OmniSciDB  04ee39c94c
Experimental::MetaTypeFactory< T, VALUES_PACK > Class Template Reference

#include <ExperimentalTypeUtilities.h>

Public Types

using ResolvedType = T
 
using MetaTypeContainer = MetaTypeAny< ResolvedType, VALUES_PACK... >
 

Static Public Member Functions

template<typename SOURCE_TYPE >
static auto getMetaType (SOURCE_TYPE &&source_type)
 

Static Private Member Functions

template<ResolvedType VALUE>
static auto resolveType (MetaTypeContainer &return_value, ResolvedType const switch_value)
 
template<ResolvedType FIRST_VALUE, ResolvedType SECOND_VALUE, ResolvedType... REMAINING_VALUES>
static auto resolveType (MetaTypeContainer &return_value, ResolvedType const switch_value)
 

Detailed Description

template<typename T, T... VALUES_PACK>
class Experimental::MetaTypeFactory< T, VALUES_PACK >

Definition at line 120 of file ExperimentalTypeUtilities.h.

Member Typedef Documentation

◆ MetaTypeContainer

template<typename T , T... VALUES_PACK>
using Experimental::MetaTypeFactory< T, VALUES_PACK >::MetaTypeContainer = MetaTypeAny<ResolvedType, VALUES_PACK...>

Definition at line 123 of file ExperimentalTypeUtilities.h.

◆ ResolvedType

template<typename T , T... VALUES_PACK>
using Experimental::MetaTypeFactory< T, VALUES_PACK >::ResolvedType = T

Definition at line 122 of file ExperimentalTypeUtilities.h.

Member Function Documentation

◆ getMetaType()

template<typename T , T... VALUES_PACK>
template<typename SOURCE_TYPE >
static auto Experimental::MetaTypeFactory< T, VALUES_PACK >::getMetaType ( SOURCE_TYPE &&  source_type)
inlinestatic

Definition at line 126 of file ExperimentalTypeUtilities.h.

References Experimental::MetaSwitchTraits< T >::getType().

Referenced by Experimental::FullMetaTypeSwitch().

126  {
127  MetaTypeContainer return_value;
128  resolveType<VALUES_PACK...>(return_value,
130  return return_value;
131  }
MetaTypeAny< ResolvedType, VALUES_PACK... > MetaTypeContainer
static auto resolveType(MetaTypeContainer &return_value, ResolvedType const switch_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveType() [1/2]

template<typename T , T... VALUES_PACK>
template<ResolvedType VALUE>
static auto Experimental::MetaTypeFactory< T, VALUES_PACK >::resolveType ( MetaTypeContainer return_value,
ResolvedType const  switch_value 
)
inlinestaticprivate

Definition at line 135 of file ExperimentalTypeUtilities.h.

References FIRST_VALUE.

136  {
137  if (switch_value == VALUE) {
138  static_cast<CapturedMetaTypeOptional<ResolvedType, VALUE>&>(return_value) =
139  MetaType<ResolvedType, VALUE>();
140  }
141  static_cast<UncapturedMetaTypeOptional&>(return_value) = UncapturedMetaType();
142  }
MetaTypeOptional< UncapturedMetaType > UncapturedMetaTypeOptional

◆ resolveType() [2/2]

template<typename T , T... VALUES_PACK>
template<ResolvedType FIRST_VALUE, ResolvedType SECOND_VALUE, ResolvedType... REMAINING_VALUES>
static auto Experimental::MetaTypeFactory< T, VALUES_PACK >::resolveType ( MetaTypeContainer return_value,
ResolvedType const  switch_value 
)
inlinestaticprivate

Definition at line 147 of file ExperimentalTypeUtilities.h.

148  {
149  if (switch_value == FIRST_VALUE) {
150  static_cast<CapturedMetaTypeOptional<ResolvedType, FIRST_VALUE>&>(return_value) =
151  MetaType<ResolvedType, FIRST_VALUE>();
152  return;
153  }
154  resolveType<SECOND_VALUE, REMAINING_VALUES...>(return_value, switch_value);
155  }
static auto resolveType(MetaTypeContainer &return_value, ResolvedType const switch_value)

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