diff options
Diffstat (limited to 'modules/codec')
-rw-r--r-- | modules/codec/c++/schema.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/codec/c++/schema.hpp b/modules/codec/c++/schema.hpp index 40dfe39..e5560fb 100644 --- a/modules/codec/c++/schema.hpp +++ b/modules/codec/c++/schema.hpp @@ -322,4 +322,31 @@ template <typename T, size_t N> struct is_primitive<schema::Primitive<T,N>> { template <typename TI, typename TS> struct is_primitive<schema::MixedPrecision<TI,TS>> { constexpr static bool value = true; }; + +template<typename Iface> +struct schema_iface_type_group { + static_assert(always_false<Iface>, "Expecting an Interface Type"); + + using Type = tmpl_group<>; +}; + +namespace impl { +template<typename... Funcs> +struct schema_func_list_helper { + using Type = tmpl_group<>; +}; + +template<typename F0, typename... Funcs> +struct schema_func_list_helper<F0,Funcs...> { + using Type = typename tmpl_concat< + tmpl_group<typename F0::Request, typename F0::Response>, + typename schema_func_list_helper<Funcs...>::Type + >::type; +}; +} + +template<typename... Funcs> +struct schema_iface_type_group<schema::Interface<Funcs...>> { + using Type = typename tmpl_reduce<typename impl::schema_func_list_helper<Funcs...>::Type>::type; +}; } // namespace saw |