Chris@16: /* Chris@101: * Copyright Andrey Semashev 2007 - 2015. Chris@16: * Distributed under the Boost Software License, Version 1.0. Chris@16: * (See accompanying file LICENSE_1_0.txt or copy at Chris@16: * http://www.boost.org/LICENSE_1_0.txt) Chris@16: */ Chris@16: Chris@16: template< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename ArgT) > Chris@16: BOOST_FORCEINLINE format_named_scope_actor< Chris@16: fallback_to_none, Chris@16: typename boost::log::aux::deduce_char_type< Chris@16: typename parameter::binding< Chris@16: typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type, Chris@16: keywords::tag::format, Chris@16: void Chris@16: >::type Chris@16: >::type Chris@16: > format_named_scope(attribute_name const& name, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg)) Chris@16: { Chris@16: typedef typename boost::log::aux::deduce_char_type< Chris@16: typename parameter::binding< Chris@16: typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type, Chris@16: keywords::tag::format, Chris@16: void Chris@16: >::type Chris@16: >::type char_type; Chris@16: return aux::format_named_scope< char_type, phoenix::actor >(name, fallback_to_none(), (BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), arg))); Chris@16: } Chris@16: Chris@16: template< typename DescriptorT, template< typename > class ActorT, BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename ArgT) > Chris@16: BOOST_FORCEINLINE format_named_scope_actor< Chris@16: fallback_to_none, Chris@16: typename boost::log::aux::deduce_char_type< Chris@16: typename parameter::binding< Chris@16: typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type, Chris@16: keywords::tag::format, Chris@16: void Chris@16: >::type Chris@16: >::type, Chris@16: ActorT Chris@16: > Chris@16: format_named_scope(attribute_keyword< DescriptorT, ActorT > const& keyword, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg)) Chris@16: { Chris@16: BOOST_STATIC_ASSERT_MSG((is_same< typename DescriptorT::value_type, attributes::named_scope::value_type >::value),\ Chris@16: "Boost.Log: Named scope formatter only accepts attribute values of type attributes::named_scope::value_type."); Chris@16: Chris@16: typedef typename boost::log::aux::deduce_char_type< Chris@16: typename parameter::binding< Chris@16: typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type, Chris@16: keywords::tag::format, Chris@16: void Chris@16: >::type Chris@16: >::type char_type; Chris@16: return aux::format_named_scope< char_type, ActorT >(keyword.get_name(), fallback_to_none(), (BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), arg))); Chris@16: } Chris@16: Chris@16: template< typename T, typename FallbackPolicyT, typename TagT, template< typename > class ActorT, BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename ArgT) > Chris@16: BOOST_FORCEINLINE format_named_scope_actor< Chris@16: FallbackPolicyT, Chris@16: typename boost::log::aux::deduce_char_type< Chris@16: typename parameter::binding< Chris@16: typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type, Chris@16: keywords::tag::format, Chris@16: void Chris@16: >::type Chris@16: >::type, Chris@16: ActorT Chris@16: > Chris@16: format_named_scope(attribute_actor< T, FallbackPolicyT, TagT, ActorT > const& placeholder, BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), ArgT, const& arg)) Chris@16: { Chris@16: BOOST_STATIC_ASSERT_MSG((is_same< T, attributes::named_scope::value_type >::value),\ Chris@16: "Boost.Log: Named scope formatter only accepts attribute values of type attributes::named_scope::value_type."); Chris@16: Chris@16: typedef typename boost::log::aux::deduce_char_type< Chris@16: typename parameter::binding< Chris@16: typename boost::log::aux::make_arg_list< BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), ArgT) >::type, Chris@16: keywords::tag::format, Chris@16: void Chris@16: >::type Chris@16: >::type char_type; Chris@16: return aux::format_named_scope< char_type, ActorT >(placeholder.get_name(), placeholder.get_fallback_policy(), (BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), arg))); Chris@16: }