Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Struct template formatter_factory



// In header: <boost/log/utility/setup/formatter_parser.hpp>

template<typename CharT> 
struct formatter_factory {
  // types
  typedef CharT                                char_type;       // Character type. 
  typedef std::basic_string< char_type >       string_type;     // String type. 
  typedef basic_formatter< char_type >         formatter_type;  // The formatter function object. 
  typedef std::map< string_type, string_type > args_map;      

  // construct/copy/destruct
  formatter_factory() = default;
  formatter_factory(formatter_factory const &) = delete;
  formatter_factory& operator=(formatter_factory const &) = delete;

  // public member functions
  formatter_type create_formatter(attribute_name const &, args_map const &);


Formatter factory base interface.

formatter_factory public types

  1. typedef std::map< string_type, string_type > args_map;

    Type of the map of formatter factory arguments [argument name -> argument value]. This type of maps will be passed to formatter factories on attempt to create a formatter.

formatter_factory public construct/copy/destruct

  1. formatter_factory() = default;

    Default constructor

  2. formatter_factory(formatter_factory const &) = delete;
  3. formatter_factory& operator=(formatter_factory const &) = delete;
  4. ~formatter_factory();

    Virtual destructor

formatter_factory public member functions

  1. formatter_type 
    create_formatter(attribute_name const & name, args_map const & args);

    The function creates a formatter for the specified attribute.



    Formatter arguments


    Attribute name