1#ifndef BLUETOE_MIXIN_HPP
2#define BLUETOE_MIXIN_HPP
7 template <
typename ... T >
10 template <
typename ... Options >
14 struct mixin_meta_type {};
16 template <
typename MixinList >
20 struct sum_mixins< std::tuple<> >
22 typedef std::tuple<> type;
25 template <
typename ... Ts,
typename ... Ms >
26 struct sum_mixins< std::tuple< mixin< Ts... >, Ms... > >{
27 typedef typename add_type<
29 typename sum_mixins< std::tuple< Ms... > >::type >::type type;
32 template <
typename List,
typename Element >
33 struct extract_service_mixins;
35 template <
typename ... Ms,
typename ... Options >
36 struct extract_service_mixins< std::tuple< Ms... >,
bluetoe::service< Options... > >
38 typedef typename find_all_by_meta_type< mixin_meta_type, Options... >::type mixins;
39 typedef typename add_type< mixins, std::tuple< Ms... > >::type type;
42 template <
typename ... Ms,
typename T >
43 struct extract_service_mixins< std::tuple< Ms... >, T >
45 typedef std::tuple< Ms... > type;
48 template <
typename ... Options >
51 typedef typename find_all_by_meta_type< mixin_meta_type, Options... >::type server_mixins;
52 typedef typename fold< std::tuple< Options ... >, extract_service_mixins >::type service_mixins;
53 typedef typename add_type< server_mixins, service_mixins >::type mixins;
54 typedef typename sum_mixins< mixins >::type type;
77 template <
typename ... T >
81 details::mixin_meta_type,
82 details::valid_service_option_meta_type,
83 details::valid_server_option_meta_type {};
a service with zero or more characteristics
Definition: service.hpp:150
class to be mixed into the server instance
Definition: mixin.hpp:78