blob: caaf63ea1dbfac4c435b25033c07d956b41cbbbf [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2// (C) Copyright Tobias Schwinger
3//
4// Use modification and distribution are subject to the boost Software License,
5// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
6
7//------------------------------------------------------------------------------
8
9// no include guards, this file is intended for multiple inclusion
10
Jeff Thompson3d613fd2013-10-15 15:39:04 -070011#if NDNBOOST_FT_ARITY_LOOP_PREFIX
Jeff Thompsona28eed82013-08-22 16:21:10 -070012
Jeff Thompson3d613fd2013-10-15 15:39:04 -070013# ifndef NDNBOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED
14# define NDNBOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -070015# include <ndnboost/preprocessor/cat.hpp>
16# include <ndnboost/preprocessor/facilities/empty.hpp>
17# include <ndnboost/preprocessor/facilities/identity.hpp>
18# include <ndnboost/preprocessor/arithmetic/dec.hpp>
19# include <ndnboost/preprocessor/punctuation/comma_if.hpp>
20# endif
21
Jeff Thompson3d613fd2013-10-15 15:39:04 -070022# define NDNBOOST_FT_type_name
Jeff Thompsona28eed82013-08-22 16:21:10 -070023
Jeff Thompson3d613fd2013-10-15 15:39:04 -070024# if !NDNBOOST_FT_mfp
Jeff Thompsona28eed82013-08-22 16:21:10 -070025
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026# define NDNBOOST_FT_types \
27 R NDNBOOST_PP_COMMA_IF(NDNBOOST_FT_arity) NDNBOOST_FT_params(NDNBOOST_PP_EMPTY)
Jeff Thompsona28eed82013-08-22 16:21:10 -070028# else
29
Jeff Thompson3d613fd2013-10-15 15:39:04 -070030# define NDNBOOST_FT_types \
31 R, typename class_transform<T0 NDNBOOST_FT_cv, L>::type \
32 NDNBOOST_PP_COMMA_IF(NDNBOOST_PP_DEC(NDNBOOST_FT_arity)) \
33 NDNBOOST_FT_params(NDNBOOST_PP_EMPTY)
Jeff Thompsona28eed82013-08-22 16:21:10 -070034
35# endif
36
Jeff Thompson3d613fd2013-10-15 15:39:04 -070037#elif NDNBOOST_FT_ARITY_LOOP_IS_ITERATING
Jeff Thompsona28eed82013-08-22 16:21:10 -070038
Jeff Thompson3d613fd2013-10-15 15:39:04 -070039template< NDNBOOST_FT_tplargs(NDNBOOST_PP_IDENTITY(typename)), typename L>
40struct components_impl<NDNBOOST_FT_type, L>
Jeff Thompsona28eed82013-08-22 16:21:10 -070041{
Jeff Thompson3d613fd2013-10-15 15:39:04 -070042 typedef encode_bits<NDNBOOST_FT_flags,NDNBOOST_FT_cc_id> bits;
43 typedef constant<NDNBOOST_FT_full_mask> mask;
Jeff Thompsona28eed82013-08-22 16:21:10 -070044
Jeff Thompson3d613fd2013-10-15 15:39:04 -070045 typedef function_types::components<NDNBOOST_FT_type, L> type;
Jeff Thompsona28eed82013-08-22 16:21:10 -070046 typedef components_mpl_sequence_tag tag;
47
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048 typedef mpl::integral_c<std::size_t,NDNBOOST_FT_arity> function_arity;
Jeff Thompsona28eed82013-08-22 16:21:10 -070049
Jeff Thompson3d613fd2013-10-15 15:39:04 -070050 typedef NDNBOOST_PP_CAT(mpl::vector,NDNBOOST_FT_n)< NDNBOOST_FT_types > types;
Jeff Thompsona28eed82013-08-22 16:21:10 -070051};
52
Jeff Thompson3d613fd2013-10-15 15:39:04 -070053#elif NDNBOOST_FT_ARITY_LOOP_SUFFIX
Jeff Thompsona28eed82013-08-22 16:21:10 -070054
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055# undef NDNBOOST_FT_types
56# undef NDNBOOST_FT_type_name
Jeff Thompsona28eed82013-08-22 16:21:10 -070057
58#else
59# error "attempt to use arity loop master file without loop"
60#endif
61