BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Classes | Namespaces | Typedefs | Functions
typelist.hpp File Reference

Defines a template for manipulating and storing compile-time lists of types. More...

#include <type_traits>
#include <functional>

Go to the source code of this file.


struct  fc::typelist::list< Types >
 The actual list type. More...
struct  fc::typelist::impl::apply< typename, class >
struct  fc::typelist::impl::apply< list< Ts... >, Delegate >
struct  fc::typelist::impl::length< Ts >
struct  fc::typelist::impl::length<>
struct  fc::typelist::impl::length< T, Ts... >
struct  fc::typelist::impl::concat<... >
struct  fc::typelist::impl::concat< list< OldTypes... >, list< NewTypes... > >
struct  fc::typelist::impl::concat< list< OldTypes... >, list< NewTypes... >, NextList, Lists... >
struct  fc::typelist::impl::make_sequence< count >
struct  fc::typelist::impl::make_sequence< 0 >
struct  fc::typelist::impl::make_sequence< 1 >
struct  fc::typelist::impl::make_sequence< count >
struct  fc::typelist::impl::transform< typename, typename >
struct  fc::typelist::impl::transform< list< List... >, Transformer >
struct  fc::typelist::impl::index_of< Search, List >
struct  fc::typelist::impl::index_of< Search, list<> >
struct  fc::typelist::impl::index_of< Search, list< T, Ts... > >
struct  fc::typelist::impl::concat_unique<... >
struct  fc::typelist::impl::concat_unique< list< Uniques... >, list<> >
struct  fc::typelist::impl::concat_unique< list< Uniques... >, list< T > >
struct  fc::typelist::impl::concat_unique< list< Uniques... >, list< T1, T2, Types... > >
struct  fc::typelist::impl::concat_unique< list< Uniques... >, list<>, Lists... >
struct  fc::typelist::impl::concat_unique< Uniques, list< L1a, L1s... >, L2, Lists... >
struct  fc::typelist::impl::at< typename, size_t >
struct  fc::typelist::impl::at< list< T, Types... >, 0 >
struct  fc::typelist::impl::at< list< T, Types... >, index >
struct  fc::typelist::impl::remove_at< typename, typename, size_t >
struct  fc::typelist::impl::remove_at< list< Left... >, list< T, Right... >, 0 >
struct  fc::typelist::impl::remove_at< list< Left... >, list< T, Right... >, index >
struct  fc::typelist::impl::filter< Filter, Filtered, List >
struct  fc::typelist::impl::filter< Filter, list< Filtered... >, list<> >
struct  fc::typelist::impl::filter< Filter, list< Filtered... >, list< T1, Types... > >
struct  fc::typelist::impl::slice< typename, typename, size_t, size_t, typename >
struct  fc::typelist::impl::slice< list< Results... >, list< Types... >, index, index, void >
struct  fc::typelist::impl::slice< list< Results... >, list< T, Types... >, 0, end, std::enable_if_t< end !=0 > >
struct  fc::typelist::impl::slice< list<>, list< T, Types... >, start, end, std::enable_if_t< start !=0 > >
struct  fc::typelist::impl::zip< typename, typename >
struct  fc::typelist::impl::zip< list<>, list<> >
struct  fc::typelist::impl::zip< list< A, As... >, list< B, Bs... > >
struct  fc::typelist::list< Types >
 The actual list type. More...
struct  fc::typelist::builder< List >
struct  fc::typelist::invert_filter< Filter >
 Template to invert a filter, i.e. filter<mylist, filter_inverter<myfilter>::type> More...
struct  fc::typelist::invert_filter< Filter >::type< T >
struct  fc::typelist::runtime::wrapper< T >
 Type wrapper object allowing arbitrary types to be passed to functions as information rather than data. More...


 This namespace contains the list type, and all of the operations and queries which can be performed upon it.
 This namespace contains some utilities that provide runtime operations on typelists.


template<typename List , template< typename... > class Delegate>
using fc::typelist::apply = typename impl::apply< List, Delegate >::type
 Apply a list of types as arguments to another template. More...
template<typename... Lists>
using fc::typelist::concat = typename impl::concat< Lists... >::type
 Concatenate two or more typelists together. More...
template<std::size_t count>
using fc::typelist::make_sequence = typename impl::make_sequence< count >::type
 Create a list of sequential integers ranging from [0, count) More...
template<typename List , typename Transformer >
using fc::typelist::transform = typename impl::transform< List, Transformer >::type
 Transform elements of a typelist. More...
template<typename... TypeLists>
using fc::typelist::concat_unique = typename impl::concat_unique< list<>, TypeLists... >::type
 Remove duplicate items from one or more typelists and concatenate them all together. More...
template<typename List , std::size_t index>
using fc::typelist::at = typename impl::at< List, index >::type
 Get the type at the specified list index. More...
template<typename List >
using fc::typelist::first = at< List, 0 >
 Get the type at the beginning of the list. More...
template<typename List >
using fc::typelist::last = at< List, length< List >() -1 >
 Get the type at the end of the list. More...
template<typename List , std::size_t index>
using fc::typelist::remove_at = typename impl::remove_at< list<>, List, index >::type
 Get the list with the element at the given index removed. More...
template<typename List , typename Remove >
using fc::typelist::remove_element = remove_at< List, index_of< List, Remove >()>
 Get the list with the given type removed. More...
template<typename List , template< typename > class Filter>
using fc::typelist::filter = typename impl::filter< Filter, list<>, List >::type
 Get a list with all elements that do not pass a filter removed. More...
template<typename List , std::size_t start, std::size_t end = length<List>()>
using fc::typelist::slice = typename impl::slice< list<>, List, start, end >::type
 Take the sublist at indexes [start, end) More...
template<typename ListA , typename ListB >
using fc::typelist::zip = typename impl::zip< ListA, ListB >::type
 Zip two equal-length typelists together, i.e. zip<list<X, Y>, list<A, B>> == list<list<X, A>, list<Y, B>> More...
template<typename List >
using fc::typelist::index = typename impl::zip< typename impl::make_sequence< length< List >()>::type, List >::type


template<typename Callable , typename Ret , typename T >
Ret fc::typelist::impl::dispatch_helper (Callable &c)
template<typename... Types, typename Callable , typename = std::enable_if_t<impl::length<Types...>::value != 0>, typename Return = decltype(std::declval<Callable>()(wrapper<at<list<Types...>, 0>>()))>
Return fc::typelist::runtime::dispatch (list< Types... >, std::size_t index, Callable c)
 Index into the typelist for a type T, and invoke the callable with an argument wrapper<T>() More...
template<typename List , typename Callable >
auto fc::typelist::runtime::dispatch (List l, int64_t index, Callable c)
template<typename... Types, typename Callable >
void fc::typelist::runtime::for_each (list< Types... >, Callable c)
 Invoke the provided callable with an argument wrapper<Type>() for each type in the list. More...

Detailed Description

Defines a template for manipulating and storing compile-time lists of types.

Definition in file typelist.hpp.