boost::logging::format_and_write::simple_care_for_clear_format< msg_type, string_type > Struct Template Reference

Formats the message, and writes it to destinations - calls operator() on the formatters , and operator() on the destinations. More...

Inheritance diagram for boost::logging::format_and_write::simple_care_for_clear_format< msg_type, string_type >:
[legend]
Collaboration diagram for boost::logging::format_and_write::simple_care_for_clear_format< msg_type, string_type >:
[legend]

List of all members.


Detailed Description

template<class msg_type, class string_type = hold_string_type>
struct boost::logging::format_and_write::simple_care_for_clear_format< msg_type, string_type >

Formats the message, and writes it to destinations - calls operator() on the formatters , and operator() on the destinations.

Cares for the clear_format() commands.

Parameters:
msg_type The message to pass to the formatter. This is the type that is passed to the formatter objects and to the destination objects. Thus, it needs to be convertible to the argument to be sent to the formatter objects and to the argument to be sent to the destination objects. Usually, it's the argument you pass on to your destination classes.
If you derive from destination::base, this type can be destination::base::raw_param (see below).

Parameters:
string_type [optional] A class that can hold a string (that is, a copy of the message)
Example:

        typedef destination::base<const std::string &> dest_base;
        // in this case : msg_type = std::string = dest_base::raw_param
        struct write_to_cout : dest_base {
            void operator()(param msg) const {
                std::cout << msg ;
            }
        };


        typedef destination::base<const std::string &> dest_base;
        // in this case : msg_type = cache_string = dest_base::raw_param
        struct write_to_file : dest_base, ... {
            void operator()(param msg) const {
                context() << msg ;
            }
        };

The documentation for this struct was generated from the following file:

Copyright John Torjo © 2007
Have a question/ suggestion/ comment? Send me feedback