Public Member Functions | |
cache_string_one_str (int reserve_prepend, int reserve_append, int grow_size=10) | |
cache_string_one_str (const string_type &msg, int reserve_prepend=10, int reserve_append=10, int grow_size=10) | |
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) | |
template<class stream_type> | |
void | to_stream (stream_type &stream) const |
const string_type & | full_string () const |
It keeps all the modified message in one string. Useful if some formatter needs to access the whole string at once.
reserve_prepend() - the size that is reserved for prepending (similar to string::reserve function) reserve_append() - the size that is reserved for appending (similar to string::reserve function)
Note : as strings are prepended, reserve_prepend() shrinks. Same goes for append.
boost::logging::optimize::cache_string_one_str< string_type_ >::cache_string_one_str | ( | int | reserve_prepend, | |
int | reserve_append, | |||
int | grow_size = 10 | |||
) | [inline] |
reserve_prepend | - how many chars to have space to prepend by default | |
reserve_append | - how many chars to have space to append by default | |
grow_size | - in case we add a string and there's no room for it, with how much should we grow? We'll grow this much in addition to the added string - in the needed direction |
boost::logging::optimize::cache_string_one_str< string_type_ >::cache_string_one_str | ( | const string_type & | msg, | |
int | reserve_prepend = 10 , |
|||
int | reserve_append = 10 , |
|||
int | grow_size = 10 | |||
) | [inline] |
msg | - the message that is originally cached | |
reserve_prepend | - how many chars to have space to prepend by default | |
reserve_append | - how many chars to have space to append by default | |
grow_size | - in case we add a string and there's no room for it, with how much should we grow? We'll grow this much in addition to the added string - in the needed direction |
void boost::logging::optimize::cache_string_one_str< string_type_ >::to_stream | ( | stream_type & | stream | ) | const [inline] |
writes the current cached contents to a stream
const string_type& boost::logging::optimize::cache_string_one_str< string_type_ >::full_string | ( | ) | const [inline] |
returns the full string