]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/log/src/setup/default_formatter_factory.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / log / src / setup / default_formatter_factory.hpp
1 /*
2 * Copyright Andrey Semashev 2007 - 2015.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
6 */
7 /*!
8 * \file default_formatter_factory.hpp
9 * \author Andrey Semashev
10 * \date 14.07.2013
11 *
12 * \brief This header is the Boost.Log library implementation, see the library documentation
13 * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
14 */
15
16 #ifndef BOOST_DEFAULT_FORMATTER_FACTORY_HPP_INCLUDED_
17 #define BOOST_DEFAULT_FORMATTER_FACTORY_HPP_INCLUDED_
18
19 #include <boost/log/detail/setup_config.hpp>
20 #include <boost/log/attributes/attribute_name.hpp>
21 #include <boost/log/utility/setup/formatter_parser.hpp>
22 #include <boost/log/detail/header.hpp>
23
24 namespace boost {
25
26 BOOST_LOG_OPEN_NAMESPACE
27
28 namespace aux {
29
30 //! The default filter factory that supports creating filters for the standard types (see utility/type_dispatch/standard_types.hpp)
31 template< typename CharT >
32 class default_formatter_factory :
33 public formatter_factory< CharT >
34 {
35 //! Base type
36 typedef formatter_factory< CharT > base_type;
37 //! Self type
38 typedef default_formatter_factory< CharT > this_type;
39
40 public:
41 // Type imports
42 typedef typename base_type::char_type char_type;
43 typedef typename base_type::string_type string_type;
44 typedef typename base_type::formatter_type formatter_type;
45 typedef typename base_type::args_map args_map;
46
47 //! The function creates a formatter for the specified attribute.
48 formatter_type create_formatter(attribute_name const& name, args_map const& args) BOOST_OVERRIDE;
49 };
50
51 } // namespace aux
52
53 BOOST_LOG_CLOSE_NAMESPACE // namespace log
54
55 } // namespace boost
56
57 #include <boost/log/detail/footer.hpp>
58
59 #endif // BOOST_DEFAULT_FORMATTER_FACTORY_HPP_INCLUDED_