OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK > Class Template Reference

#include <ExperimentalTypeUtilities.h>

+ Inheritance diagram for Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >:
+ Collaboration diagram for Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >:

Public Types

using ResolvedType = T
 

Public Member Functions

template<typename META_TYPE , typename... ARG_PACK>
decltype(auto) operator() (META_TYPE const &meta_type, ARG_PACK &&...args)
 

Static Public Attributes

static constexpr std::size_t handled_type_count = sizeof...(HANDLED_VALUES_PACK)
 

Private Member Functions

template<typename META_TYPE , typename ARG_PACKAGING , ResolvedType VALUE>
decltype(auto) handleMetaType (META_TYPE const &meta_type, ARG_PACKAGING &&arg_packaging)
 
template<typename META_TYPE , typename ARG_PACKAGING , ResolvedType FIRST_VALUE, ResolvedType SECOND_VALUE, ResolvedType... REMAINING_VALUES>
decltype(auto) handleMetaType (META_TYPE const &meta_type, ARG_PACKAGING &&arg_packaging)
 

Additional Inherited Members

- Protected Member Functions inherited from Experimental::Cpp14::Applicator
template<class FUNCTION_TYPE , class TUPLE_TYPE , std::size_t... I>
decltype(auto) internalApplyImpl (FUNCTION_TYPE &&f, TUPLE_TYPE &&t, std::index_sequence< I...>)
 
template<class FUNCTION_TYPE , class TUPLE_TYPE >
decltype(auto) internalApply (FUNCTION_TYPE &&f, TUPLE_TYPE &&t)
 

Detailed Description

template<template< class > class SPECIALIZED_HANDLER, typename T, T... HANDLED_VALUES_PACK>
class Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >

Definition at line 223 of file ExperimentalTypeUtilities.h.

Member Typedef Documentation

template<template< class > class SPECIALIZED_HANDLER, typename T , T... HANDLED_VALUES_PACK>
using Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::ResolvedType = T

Definition at line 225 of file ExperimentalTypeUtilities.h.

Member Function Documentation

template<template< class > class SPECIALIZED_HANDLER, typename T , T... HANDLED_VALUES_PACK>
template<typename META_TYPE , typename ARG_PACKAGING , ResolvedType VALUE>
decltype(auto) Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::handleMetaType ( META_TYPE const &  meta_type,
ARG_PACKAGING &&  arg_packaging 
)
inlineprivate

Definition at line 237 of file ExperimentalTypeUtilities.h.

References Experimental::Cpp14::Applicator::internalApply().

Referenced by Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::handleMetaType(), and Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::operator()().

238  {
239  using InspectionValue = MetaType<ResolvedType, VALUE>;
240  using CastAssistType =
241  CapturedMetaTypeOptional<ResolvedType, InspectionValue::resolved_value>;
242 
243  auto const& lhs_ref = static_cast<CastAssistType const&>(meta_type);
244  if (!lhs_ref) {
245  return internalApply(SPECIALIZED_HANDLER<UncapturedMetaType>(), arg_packaging);
246  }
247  return internalApply(SPECIALIZED_HANDLER<InspectionValue>(), arg_packaging);
248  };
decltype(auto) internalApply(FUNCTION_TYPE &&f, TUPLE_TYPE &&t)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<template< class > class SPECIALIZED_HANDLER, typename T , T... HANDLED_VALUES_PACK>
template<typename META_TYPE , typename ARG_PACKAGING , ResolvedType FIRST_VALUE, ResolvedType SECOND_VALUE, ResolvedType... REMAINING_VALUES>
decltype(auto) Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::handleMetaType ( META_TYPE const &  meta_type,
ARG_PACKAGING &&  arg_packaging 
)
inlineprivate

Definition at line 255 of file ExperimentalTypeUtilities.h.

References Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::handleMetaType(), and Experimental::Cpp14::Applicator::internalApply().

256  {
257  using InspectionValue = MetaType<ResolvedType, FIRST_VALUE>;
258  using CastAssistType =
259  CapturedMetaTypeOptional<ResolvedType, InspectionValue::resolved_value>;
260 
261  auto const& lhs_ref = static_cast<CastAssistType const&>(meta_type);
262  if (!lhs_ref) {
263  return handleMetaType<META_TYPE, ARG_PACKAGING, SECOND_VALUE, REMAINING_VALUES...>(
264  meta_type, std::forward<ARG_PACKAGING&&>(arg_packaging));
265  }
266  return internalApply(SPECIALIZED_HANDLER<InspectionValue>(), arg_packaging);
267  };
decltype(auto) internalApply(FUNCTION_TYPE &&f, TUPLE_TYPE &&t)
decltype(auto) handleMetaType(META_TYPE const &meta_type, ARG_PACKAGING &&arg_packaging)

+ Here is the call graph for this function:

template<template< class > class SPECIALIZED_HANDLER, typename T , T... HANDLED_VALUES_PACK>
template<typename META_TYPE , typename... ARG_PACK>
decltype(auto) Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::operator() ( META_TYPE const &  meta_type,
ARG_PACK &&...  args 
)
inline

Definition at line 229 of file ExperimentalTypeUtilities.h.

References Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::handleMetaType().

229  {
230  using ArgumentPackaging = decltype(std::forward_as_tuple(args...));
231  return handleMetaType<META_TYPE, ArgumentPackaging, HANDLED_VALUES_PACK...>(
232  meta_type, std::forward_as_tuple(args...));
233  }
decltype(auto) handleMetaType(META_TYPE const &meta_type, ARG_PACKAGING &&arg_packaging)

+ Here is the call graph for this function:

Member Data Documentation

template<template< class > class SPECIALIZED_HANDLER, typename T , T... HANDLED_VALUES_PACK>
constexpr std::size_t Experimental::Cpp14::MetaTypeHandler< SPECIALIZED_HANDLER, T, HANDLED_VALUES_PACK >::handled_type_count = sizeof...(HANDLED_VALUES_PACK)
static

Definition at line 226 of file ExperimentalTypeUtilities.h.


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