boost::logging::gather::ostream_like::return_str< string, stream_type > Struct Template Reference
Allows you to write to a log using the cool "<<" operator. The .msg() returns a string - whatever you set as first template param.
More...
List of all members.
|
Public Member Functions |
string | msg () |
| returns a string
|
Detailed Description
template<class string = boost::logging::optimize::cache_string_one_str<hold_string_type>, class stream_type = std::basic_ostringstream<char_type>>
struct boost::logging::gather::ostream_like::return_str< string, stream_type >
Allows you to write to a log using the cool "<<" operator. The .msg() returns a string - whatever you set as first template param.
By default, it's cache_string.
A class that implements gathering the message needs 2 things:
- a function that will gather the data - called
.out()
- define a function called
.msg()
that will return the gathered data (once all data has been gathered). - have a public type named "msg_type" - be it a class or a typedef
- this contains what the gather_msg class returns, as non-reference, non-const (that is, msg_type != const msg_type, "msg_type&" is a not a reference-to-reference)
See also:
- Bug:
- right now prepend_size and append_size are ignored; because we can also return a cache_string_several_str<>. When fixing, watch the find_gather class!
The documentation for this struct was generated from the following file:
Copyright John Torjo © 2007
Have a question/ suggestion/ comment? Send me feedback