The Sparta Modeling Framework
Loading...
Searching...
No Matches
MetaTypeList.hpp File Reference

Contains the implementation of Metatype_lists, a compile-time list for storing different type structures which can be accessed by using nested type aliases inside. Metatype_lists are extremely useful in Template MetaProgramming. More...

#include <type_traits>
#include <memory>

Go to the source code of this file.

Classes

class  MetaTypeList::type_list<... >
 The variadic class template type_list has no implementation and is empty by itself. More...
 
class  MetaTypeList::create< type_list<>, Head, Tail... >
 Specialization where no type_list exist. More...
 
class  MetaTypeList::create< type_list< Elements... >, Head, Tail... >
 Specialization where type_list exists in the intermediate derivations. More...
 
class  MetaTypeList::create< type_list< Elements... > >
 Base case where we have consumed all the paramters in the pack and created the type_list. We just typedef it. More...
 
class  MetaTypeList::frontT< type_list< Head, Tail... > >
 frontT Template Specialization. More...
 
class  MetaTypeList::pop_frontT< type_list< Head, Tail... > >
 pop_frontT Template Specialization. More...
 
class  MetaTypeList::push_frontT< type_list< Elements... >, NewElement >
 push_frontT Template Specialization. More...
 
class  MetaTypeList::push_backT< type_list< Elements... >, NewElement >
 push_backT Template Specialization. More...
 
class  MetaTypeList::nth_elementT< List, N >
 This class template gives us the type of Nth element in a type_list by taking advantage of the nested alias template in frontT<T>. More...
 
class  MetaTypeList::nth_elementT< List, 0 >
 nth_elementT Template Specialization. More...
 
class  MetaTypeList::is_empty< typename >
 Class Template is_empty Generic case. More...
 
class  MetaTypeList::is_empty< type_list<> >
 Class Template is_empty Specialization. More...
 
class  MetaTypeList::get_pack_size< type_list< Head, Tail... > >
 Unroll Templates till Base case specialization is reached and accumulate. More...
 
class  MetaTypeList::get_pack_size< type_list<> >
 Base case specialization. More...
 
struct  MetaTypeList::is_meta_typelist<... >
 Variadic Class Template which takes a type and matches it if that is a type_list. Generic case results to false. More...
 
struct  MetaTypeList::is_meta_typelist< MetaTypeList::type_list< Args... > >
 Template Specialization when the type indeed is a type_list. More...
 
class  MetaTypeList::get_index< S, T, type_list< Head, Tail... >, typename std::enable_if< std::is_same< T, Head >::value >::type >
 Class Template to return the index of a certain type in a certain typelist. Case when queried type matches front type. More...
 
class  MetaTypeList::get_index< S, T, type_list< Head, Tail... >, typename std::enable_if<!std::is_same< T, Head >::value >::type >
 Class Template to return the index of a certain type in a certain typelist. Case when queried type does not match front type. More...
 

Typedefs

template<typename... Elements>
using MetaTypeList::create_t = typename create< type_list< Elements... > >::type
 create Alias Template.
 
template<typename List >
using MetaTypeList::front = typename frontT< List >::type
 frontT Alias Template.
 
template<typename List >
using MetaTypeList::pop_front = typename pop_frontT< List >::type
 pop_frontT Alias Template.
 
template<typename List , typename NewElement >
using MetaTypeList::push_front = typename push_frontT< List, NewElement >::type
 push_frontT Alias Template.
 
template<typename List , typename NewElement >
using MetaTypeList::push_back = typename push_backT< List, NewElement >::type
 push_backT Alias Template.
 
template<typename List , unsigned N>
using MetaTypeList::nth_element = typename nth_elementT< List, N >::type
 nth_elementT Alias Template.
 

Detailed Description

Contains the implementation of Metatype_lists, a compile-time list for storing different type structures which can be accessed by using nested type aliases inside. Metatype_lists are extremely useful in Template MetaProgramming.

Definition in file MetaTypeList.hpp.

Typedef Documentation

◆ create_t

template<typename... Elements>
using MetaTypeList::create_t = typedef typename create<type_list<Elements...> >::type

create Alias Template.

Definition at line 64 of file MetaTypeList.hpp.

◆ front

template<typename List >
using MetaTypeList::front = typedef typename frontT<List>::type

frontT Alias Template.

Definition at line 88 of file MetaTypeList.hpp.

◆ nth_element

template<typename List , unsigned N>
using MetaTypeList::nth_element = typedef typename nth_elementT<List, N>::type

nth_elementT Alias Template.

Definition at line 182 of file MetaTypeList.hpp.

◆ pop_front

template<typename List >
using MetaTypeList::pop_front = typedef typename pop_frontT<List>::type

pop_frontT Alias Template.

Definition at line 112 of file MetaTypeList.hpp.

◆ push_back

template<typename List , typename NewElement >
using MetaTypeList::push_back = typedef typename push_backT<List, NewElement>::type

push_backT Alias Template.

Definition at line 162 of file MetaTypeList.hpp.

◆ push_front

template<typename List , typename NewElement >
using MetaTypeList::push_front = typedef typename push_frontT<List, NewElement>::type

push_frontT Alias Template.

Definition at line 137 of file MetaTypeList.hpp.