Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:21

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2015.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 
0008 template< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename ArgT) >
0009 BOOST_FORCEINLINE format_named_scope_actor<
0010     fallback_to_none,
0011     typename boost::log::aux::deduce_char_type<
0012         typename parameter::binding<
0013             typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type,
0014             keywords::tag::format,
0015             void
0016         >::type
0017     >::type
0018 > format_named_scope(attribute_name const& name, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg))
0019 {
0020     typedef typename boost::log::aux::deduce_char_type<
0021         typename parameter::binding<
0022             typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type,
0023             keywords::tag::format,
0024             void
0025         >::type
0026     >::type char_type;
0027     return aux::format_named_scope< char_type, phoenix::actor >(name, fallback_to_none(), (BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), arg)));
0028 }
0029 
0030 template< typename DescriptorT, template< typename > class ActorT, BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename ArgT) >
0031 BOOST_FORCEINLINE format_named_scope_actor<
0032     fallback_to_none,
0033     typename boost::log::aux::deduce_char_type<
0034         typename parameter::binding<
0035             typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type,
0036             keywords::tag::format,
0037             void
0038         >::type
0039     >::type,
0040     ActorT
0041 >
0042 format_named_scope(attribute_keyword< DescriptorT, ActorT > const& keyword, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg))
0043 {
0044     BOOST_STATIC_ASSERT_MSG((is_same< typename DescriptorT::value_type, attributes::named_scope::value_type >::value),\
0045         "Boost.Log: Named scope formatter only accepts attribute values of type attributes::named_scope::value_type.");
0046 
0047     typedef typename boost::log::aux::deduce_char_type<
0048         typename parameter::binding<
0049             typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type,
0050             keywords::tag::format,
0051             void
0052         >::type
0053     >::type char_type;
0054     return aux::format_named_scope< char_type, ActorT >(keyword.get_name(), fallback_to_none(), (BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), arg)));
0055 }
0056 
0057 template< typename T, typename FallbackPolicyT, typename TagT, template< typename > class ActorT, BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename ArgT) >
0058 BOOST_FORCEINLINE format_named_scope_actor<
0059     FallbackPolicyT,
0060     typename boost::log::aux::deduce_char_type<
0061         typename parameter::binding<
0062             typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type,
0063             keywords::tag::format,
0064             void
0065         >::type
0066     >::type,
0067     ActorT
0068 >
0069 format_named_scope(attribute_actor< T, FallbackPolicyT, TagT, ActorT > const& placeholder, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg))
0070 {
0071     BOOST_STATIC_ASSERT_MSG((is_same< T, attributes::named_scope::value_type >::value),\
0072         "Boost.Log: Named scope formatter only accepts attribute values of type attributes::named_scope::value_type.");
0073 
0074     typedef typename boost::log::aux::deduce_char_type<
0075         typename parameter::binding<
0076             typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type,
0077             keywords::tag::format,
0078             void
0079         >::type
0080     >::type char_type;
0081     return aux::format_named_scope< char_type, ActorT >(placeholder.get_name(), placeholder.get_fallback_policy(), (BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), arg)));
0082 }