Public Member Functions | |
cache_string_several_str (int reserve_=512) | |
cache_string_several_str (const string_type &msg, int reserve_=512) | |
void | set_string_swap (string_type &msg) |
void | set_string (const string_type &msg) |
sets the string | |
void | prepend_string (const string_type &str) |
pre-pends a string (inserts it at the beginning) | |
void | append_string (const string_type &str) |
appends a string (inserts it at the end) | |
void | set_last_id (ptr_type id) |
void | reuse (ptr_type id) |
Reuses a pre-pended or appended string. The message was already cached. | |
const string_type & | full_string () const |
computes (if necessary) and returns the full string | |
operator const string_type & () const | |
computes (if necessary) and returns the full string | |
void | restart () |
This restarts writing the messages. Whatever is cached can be used again. |
When you prepend or append, you can also specify an extra argument - an identifier. This identifier uniquely identifies the prepended or appended message.
Afterwards, you can prepend/append only by specifying an identifier - which will identify a previously appended or prepended message
boost::logging::optimize::cache_string_several_str< string_type_, ptr_type >::cache_string_several_str | ( | int | reserve_ = 512 |
) | [inline] |
constructs an object
reserve_ | [optional, default = 512] When creating the full msg, how much should we reserve? |
boost::logging::optimize::cache_string_several_str< string_type_, ptr_type >::cache_string_several_str | ( | const string_type & | msg, | |
int | reserve_ = 512 | |||
) | [inline] |
constructs an object
reserve_ | [optional, default = 512] When creating the full msg, how much should we reserve? |
void boost::logging::optimize::cache_string_several_str< string_type_, ptr_type >::set_string_swap | ( | string_type & | msg | ) | [inline] |
sets the string with a swap (that is, you pass a non-const refererence, and we do a swap)
void boost::logging::optimize::cache_string_several_str< string_type_, ptr_type >::set_last_id | ( | ptr_type | id | ) | [inline] |
Specifies the id of the last message