blob: 292a5bd26b510f2be5eb11b4255423cb4e665a68 [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 guarded externally
10
11#ifdef __WAVE__
12// this file has been generated from the master.hpp file in the same directory
13# pragma wave option(preserve: 0)
14#endif
15
Jeff Thompson3d613fd2013-10-15 15:39:04 -070016#if !defined(NDNBOOST_PP_VALUE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070017# include <ndnboost/preprocessor/slot/slot.hpp>
18# include <ndnboost/preprocessor/iteration/self.hpp>
19
20# include <ndnboost/function_types/detail/encoding/def.hpp>
21# include <ndnboost/function_types/detail/encoding/aliases_def.hpp>
22
23namespace ndnboost { namespace function_types {
24
25namespace detail
26{
27 template<class Tag, class RefTag> struct selector_bits
28 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# define NDNBOOST_PP_VALUE non_member|member|non_variadic|variadic
30# include NDNBOOST_PP_ASSIGN_SLOT(1)
Jeff Thompsona28eed82013-08-22 16:21:10 -070031
Jeff Thompson3d613fd2013-10-15 15:39:04 -070032 NDNBOOST_STATIC_CONSTANT(bits_t, value = (
33 (::ndnboost::function_types::detail::bits<Tag>::value & NDNBOOST_FT_default_cc)
34 | (::ndnboost::function_types::detail::bits<RefTag>::value & NDNBOOST_PP_SLOT(1))
Jeff Thompsona28eed82013-08-22 16:21:10 -070035 ));
36 };
37
38 template<bits_t SelectorBits> struct default_cc_tag;
39
40 template<class Tag, class RefTag> struct retag_default_cc
41 : detail::compound_tag
42 < Tag, detail::default_cc_tag<
43 ::ndnboost::function_types::detail::selector_bits<Tag,RefTag>::value > >
44 { };
45
46 template<bits_t SelectorBits> struct default_cc_tag
47 {
48 typedef null_tag::bits bits;
49 typedef null_tag::mask mask;
50 };
51
52 class test_class;
Jeff Thompson3d613fd2013-10-15 15:39:04 -070053 typedef constant<NDNBOOST_FT_cc_mask> cc_mask_constant;
Jeff Thompsona28eed82013-08-22 16:21:10 -070054
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055# define NDNBOOST_FT_self \
Jeff Thompsona28eed82013-08-22 16:21:10 -070056 <ndnboost/function_types/detail/pp_retag_default_cc/master.hpp>
57
Jeff Thompson3d613fd2013-10-15 15:39:04 -070058# define default_cc_ NDNBOOST_FT_default_cc
Jeff Thompsona28eed82013-08-22 16:21:10 -070059
Jeff Thompson3d613fd2013-10-15 15:39:04 -070060# define NDNBOOST_PP_VALUE default_cc_|non_member|non_variadic
61# define NDNBOOST_FT_tester void (*tester)()
62# define NDNBOOST_PP_INDIRECT_SELF NDNBOOST_FT_self
63# include NDNBOOST_PP_INCLUDE_SELF()
Jeff Thompsona28eed82013-08-22 16:21:10 -070064
Jeff Thompson3d613fd2013-10-15 15:39:04 -070065# define NDNBOOST_PP_VALUE default_cc_|non_member|variadic
66# define NDNBOOST_FT_tester void (*tester)(...)
67# define NDNBOOST_PP_INDIRECT_SELF NDNBOOST_FT_self
68# include NDNBOOST_PP_INCLUDE_SELF()
Jeff Thompsona28eed82013-08-22 16:21:10 -070069
Jeff Thompson3d613fd2013-10-15 15:39:04 -070070# define NDNBOOST_PP_VALUE default_cc_|member|non_variadic
71# define NDNBOOST_FT_tester void (test_class::*tester)()
72# define NDNBOOST_PP_INDIRECT_SELF NDNBOOST_FT_self
73# include NDNBOOST_PP_INCLUDE_SELF()
Jeff Thompsona28eed82013-08-22 16:21:10 -070074
Jeff Thompson3d613fd2013-10-15 15:39:04 -070075# define NDNBOOST_PP_VALUE default_cc_|member|variadic
76# define NDNBOOST_FT_tester void (test_class::*tester)(...)
77# define NDNBOOST_PP_INDIRECT_SELF NDNBOOST_FT_self
78# include NDNBOOST_PP_INCLUDE_SELF()
Jeff Thompsona28eed82013-08-22 16:21:10 -070079
80# undef default_cc_
81
Jeff Thompson3d613fd2013-10-15 15:39:04 -070082# undef NDNBOOST_FT_self
Jeff Thompsona28eed82013-08-22 16:21:10 -070083
84} } } // namespace ::ndnboost::function_types::detail
85
86# include <ndnboost/function_types/detail/encoding/aliases_undef.hpp>
87# include <ndnboost/function_types/detail/encoding/undef.hpp>
88
Jeff Thompson3d613fd2013-10-15 15:39:04 -070089#else // if defined(NDNBOOST_PP_VALUE)
Jeff Thompsona28eed82013-08-22 16:21:10 -070090
Jeff Thompson3d613fd2013-10-15 15:39:04 -070091# include NDNBOOST_PP_ASSIGN_SLOT(1)
Jeff Thompsona28eed82013-08-22 16:21:10 -070092
Jeff Thompson3d613fd2013-10-15 15:39:04 -070093 template<> struct default_cc_tag<NDNBOOST_PP_SLOT(1)>
Jeff Thompsona28eed82013-08-22 16:21:10 -070094 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070095 typedef NDNBOOST_FT_tester;
Jeff Thompsona28eed82013-08-22 16:21:10 -070096 typedef mpl::bitand_<components<tester>::bits,cc_mask_constant> bits;
97 typedef cc_mask_constant mask;
98 };
99
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700100# undef NDNBOOST_FT_tester
Jeff Thompsona28eed82013-08-22 16:21:10 -0700101
102#endif
103