Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | |
| 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 Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 11 | #if NDNBOOST_FT_ARITY_LOOP_PREFIX |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 12 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 13 | # ifndef NDNBOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED |
| 14 | # define NDNBOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 15 | # 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 Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 22 | # define NDNBOOST_FT_type_name |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 23 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 24 | # if !NDNBOOST_FT_mfp |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 25 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 26 | # define NDNBOOST_FT_types \ |
| 27 | R NDNBOOST_PP_COMMA_IF(NDNBOOST_FT_arity) NDNBOOST_FT_params(NDNBOOST_PP_EMPTY) |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 28 | # else |
| 29 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 30 | # 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 Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 34 | |
| 35 | # endif |
| 36 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 37 | #elif NDNBOOST_FT_ARITY_LOOP_IS_ITERATING |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 38 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 39 | template< NDNBOOST_FT_tplargs(NDNBOOST_PP_IDENTITY(typename)), typename L> |
| 40 | struct components_impl<NDNBOOST_FT_type, L> |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 41 | { |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 42 | typedef encode_bits<NDNBOOST_FT_flags,NDNBOOST_FT_cc_id> bits; |
| 43 | typedef constant<NDNBOOST_FT_full_mask> mask; |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 44 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 45 | typedef function_types::components<NDNBOOST_FT_type, L> type; |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 46 | typedef components_mpl_sequence_tag tag; |
| 47 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 48 | typedef mpl::integral_c<std::size_t,NDNBOOST_FT_arity> function_arity; |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 49 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 50 | typedef NDNBOOST_PP_CAT(mpl::vector,NDNBOOST_FT_n)< NDNBOOST_FT_types > types; |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 51 | }; |
| 52 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 53 | #elif NDNBOOST_FT_ARITY_LOOP_SUFFIX |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 54 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 55 | # undef NDNBOOST_FT_types |
| 56 | # undef NDNBOOST_FT_type_name |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 57 | |
| 58 | #else |
| 59 | # error "attempt to use arity loop master file without loop" |
| 60 | #endif |
| 61 | |