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.

Class template basic_formatter_factory



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

template<typename CharT, typename AttributeValueT> 
class basic_formatter_factory : public boost::log::formatter_factory< CharT > {
  // types
  typedef AttributeValueT           value_type;      // Attribute value type. 
  typedef base_type::formatter_type formatter_type;  // The formatter function object. 
  typedef base_type::args_map       args_map;      

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


Base class for formatter factories. This class provides default implementation of formatter expressions for types supporting stream output. The factory does not take into account any additional parameters that may be specified.

basic_formatter_factory public types

  1. typedef base_type::args_map 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.

basic_formatter_factory public member functions

  1. virtual 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