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

#include <ExperimentalTypeUtilities.h>

+ Inheritance diagram for Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >:
+ Collaboration diagram for Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >:

Public Types

using TypeList = std::tuple< MetaTypeClass< HANDLED_TYPE_CLASSES_PACK >...>
 

Public Member Functions

template<typename META_TYPE_CLASS , typename... ARG_PACK>
decltype(auto) operator() (META_TYPE_CLASS &meta_type_class, ARG_PACK &&...args)
 

Static Public Attributes

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

Private Member Functions

template<typename META_TYPE_CLASS , typename ARG_PACKAGING , MetaTypeClassifications HANDLED_TYPE>
decltype(auto) handleMetaTypeClass (META_TYPE_CLASS &meta_type_class, ARG_PACKAGING &&arg_packaging)
 
template<typename META_TYPE_CLASS , typename ARG_PACKAGING , MetaTypeClassifications FIRST_HANDLED_TYPE, MetaTypeClassifications SECOND_HANDLED_TYPE, MetaTypeClassifications... REMAINING_TYPES>
decltype(auto) handleMetaTypeClass (META_TYPE_CLASS &meta_type_class, 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, MetaTypeClassifications... HANDLED_TYPE_CLASSES_PACK>
class Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >

Definition at line 272 of file ExperimentalTypeUtilities.h.

Member Typedef Documentation

template<template< class > class SPECIALIZED_HANDLER, MetaTypeClassifications... HANDLED_TYPE_CLASSES_PACK>
using Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::TypeList = std::tuple<MetaTypeClass<HANDLED_TYPE_CLASSES_PACK>...>

Definition at line 274 of file ExperimentalTypeUtilities.h.

Member Function Documentation

template<template< class > class SPECIALIZED_HANDLER, MetaTypeClassifications... HANDLED_TYPE_CLASSES_PACK>
template<typename META_TYPE_CLASS , typename ARG_PACKAGING , MetaTypeClassifications HANDLED_TYPE>
decltype(auto) Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::handleMetaTypeClass ( META_TYPE_CLASS &  meta_type_class,
ARG_PACKAGING &&  arg_packaging 
)
inlineprivate

Definition at line 290 of file ExperimentalTypeUtilities.h.

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

Referenced by Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::handleMetaTypeClass(), and Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::operator()().

291  {
292  using InspectionClass = MetaTypeClass<HANDLED_TYPE>;
293  using CastAssistClass =
294  CapturedMetaTypeClassOptional<InspectionClass::sql_type_class>;
295 
296  auto& lhs_ref = static_cast<CastAssistClass&>(meta_type_class);
297  if (!lhs_ref) {
298  return internalApply(SPECIALIZED_HANDLER<UncapturedMetaTypeClassOptional>(),
299  arg_packaging);
300  }
301  return internalApply(SPECIALIZED_HANDLER<InspectionClass>(), arg_packaging);
302  }
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, MetaTypeClassifications... HANDLED_TYPE_CLASSES_PACK>
template<typename META_TYPE_CLASS , typename ARG_PACKAGING , MetaTypeClassifications FIRST_HANDLED_TYPE, MetaTypeClassifications SECOND_HANDLED_TYPE, MetaTypeClassifications... REMAINING_TYPES>
decltype(auto) Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::handleMetaTypeClass ( META_TYPE_CLASS &  meta_type_class,
ARG_PACKAGING &&  arg_packaging 
)
inlineprivate

Definition at line 309 of file ExperimentalTypeUtilities.h.

References Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::handleMetaTypeClass(), and Experimental::Cpp14::Applicator::internalApply().

310  {
311  using InspectionClass = MetaTypeClass<FIRST_HANDLED_TYPE>;
312  using CastAssistClass =
313  CapturedMetaTypeClassOptional<InspectionClass::sql_type_class>;
314 
315  auto& lhs_ref = static_cast<CastAssistClass&>(meta_type_class);
316  if (!lhs_ref) {
317  return handleMetaTypeClass<META_TYPE_CLASS,
318  ARG_PACKAGING,
319  SECOND_HANDLED_TYPE,
320  REMAINING_TYPES...>(
321  meta_type_class, std::forward<ARG_PACKAGING>(arg_packaging));
322  }
323  return internalApply(SPECIALIZED_HANDLER<InspectionClass>(), arg_packaging);
324  }
decltype(auto) internalApply(FUNCTION_TYPE &&f, TUPLE_TYPE &&t)
decltype(auto) handleMetaTypeClass(META_TYPE_CLASS &meta_type_class, ARG_PACKAGING &&arg_packaging)

+ Here is the call graph for this function:

template<template< class > class SPECIALIZED_HANDLER, MetaTypeClassifications... HANDLED_TYPE_CLASSES_PACK>
template<typename META_TYPE_CLASS , typename... ARG_PACK>
decltype(auto) Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::operator() ( META_TYPE_CLASS &  meta_type_class,
ARG_PACK &&...  args 
)
inline

Definition at line 278 of file ExperimentalTypeUtilities.h.

References Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::handleMetaTypeClass().

278  {
279  using ArgumentPackaging = decltype(std::forward_as_tuple(args...));
280  return handleMetaTypeClass<META_TYPE_CLASS,
281  ArgumentPackaging,
282  HANDLED_TYPE_CLASSES_PACK...>(
283  meta_type_class, std::forward_as_tuple(args...));
284  }
decltype(auto) handleMetaTypeClass(META_TYPE_CLASS &meta_type_class, ARG_PACKAGING &&arg_packaging)

+ Here is the call graph for this function:

Member Data Documentation

template<template< class > class SPECIALIZED_HANDLER, MetaTypeClassifications... HANDLED_TYPE_CLASSES_PACK>
constexpr std::size_t Experimental::Cpp14::MetaTypeClassHandler< SPECIALIZED_HANDLER, HANDLED_TYPE_CLASSES_PACK >::handled_type_count = sizeof...(HANDLED_TYPE_CLASSES_PACK)
static

Definition at line 275 of file ExperimentalTypeUtilities.h.


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