24#ifndef RAII_TARGETED_STRINGSTREAM_H_INCLUDED
25#define RAII_TARGETED_STRINGSTREAM_H_INCLUDED
51 std::string &target,
const std::string &suffix =
"",
52 const std::function<
void(
const std::string &)> &callback =
nullptr);
Like std::stringstream, copying to a given target string at destruction.
Definition: targeted_stringstream.h:48
bool m_active
Definition: targeted_stringstream.h:66
friend Targeted_stringstream & operator<<(Targeted_stringstream &stream, const T &value)
Definition: targeted_stringstream.h:81
std::ostringstream m_stream
Definition: targeted_stringstream.h:69
Targeted_stringstream & operator=(const Targeted_stringstream &)=delete
std::function< void(std::string &)> m_callback
Definition: targeted_stringstream.h:70
std::string m_suffix
Definition: targeted_stringstream.h:68
std::string & m_target
Definition: targeted_stringstream.h:67
Targeted_stringstream(std::string &target, const std::string &suffix="", const std::function< void(const std::string &)> &callback=nullptr)
Definition: targeted_stringstream.cc:28
~Targeted_stringstream()
Definition: targeted_stringstream.cc:57
Targeted_stringstream(const Targeted_stringstream &)=delete
Targeted_stringstream & operator<<(Targeted_stringstream &&stream, const T &value)
Definition: targeted_stringstream.h:74
std::basic_ostringstream< char, std::char_traits< char >, ut::allocator< char > > ostringstream
Specialization of basic_ostringstream which uses ut::allocator.
Definition: ut0new.h:2870