/* * Copyright Andrey Semashev 2007 - 2014. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ /*! * \file default_formatter_factory.hpp * \author Andrey Semashev * \date 14.07.2013 * * \brief This header is the Boost.Log library implementation, see the library documentation * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html. */ #if !defined(BOOST_LOG_WITHOUT_SETTINGS_PARSERS) && !defined(BOOST_LOG_WITHOUT_DEFAULT_FACTORIES) #undef BOOST_MPL_LIMIT_VECTOR_SIZE #define BOOST_MPL_LIMIT_VECTOR_SIZE 50 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_LOG_NO_THREADS) #include #endif #include #include "default_formatter_factory.hpp" #include namespace boost { BOOST_LOG_OPEN_NAMESPACE namespace aux { //! The callback for equality relation filter template< typename CharT > typename default_formatter_factory< CharT >::formatter_type default_formatter_factory< CharT >::create_formatter(attribute_name const& name, args_map const& args) { // No user-defined factory, shall use the most generic formatter we can ever imagine at this point typedef mpl::copy< // We have to exclude std::time_t since it's an integral type and will conflict with one of the standard types boost_time_period_types, mpl::back_inserter< mpl::copy< boost_time_duration_types, mpl::back_inserter< boost_date_time_types > >::type > >::type time_related_types; typedef mpl::copy< mpl::copy< mpl::vector< attributes::named_scope_list, #if !defined(BOOST_LOG_NO_THREADS) log::aux::thread::id, #endif log::aux::process::id >, mpl::back_inserter< time_related_types > >::type, mpl::back_inserter< default_attribute_types > >::type supported_types; return formatter_type(expressions::stream << expressions::attr< supported_types::type >(name)); } // Explicitly instantiate factory implementation #ifdef BOOST_LOG_USE_CHAR template class default_formatter_factory< char >; #endif #ifdef BOOST_LOG_USE_WCHAR_T template class default_formatter_factory< wchar_t >; #endif } // namespace aux BOOST_LOG_CLOSE_NAMESPACE // namespace log } // namespace boost #include #endif // !defined(BOOST_LOG_WITHOUT_SETTINGS_PARSERS) && !defined(BOOST_LOG_WITHOUT_DEFAULT_FACTORIES)