MySQL 9.1.0
Source Code Documentation
|
Like std::stringstream, copying to a given target string at destruction. More...
#include <targeted_stringstream.h>
Public Member Functions | |
Targeted_stringstream (std::string &target, const std::string &suffix="", const std::function< void(const std::string &)> &callback=nullptr) | |
Targeted_stringstream (const Targeted_stringstream &)=delete | |
Targeted_stringstream (Targeted_stringstream &&other) noexcept | |
Targeted_stringstream & | operator= (const Targeted_stringstream &)=delete |
Targeted_stringstream & | operator= (Targeted_stringstream &&other) noexcept |
~Targeted_stringstream () | |
Private Attributes | |
bool | m_active |
std::string & | m_target |
std::string | m_suffix |
std::ostringstream | m_stream |
std::function< void(std::string &)> | m_callback |
Friends | |
template<class T > | |
Targeted_stringstream & | operator<< (Targeted_stringstream &stream, const T &value) |
template<class T > | |
Targeted_stringstream & | operator<< (Targeted_stringstream &&stream, const T &value) |
Like std::stringstream, copying to a given target string at destruction.
This is a convenience helper, allowing the use of:
instead of:
This can, for instance, be used by a class to export a stream interface to update private string members.
|
explicit |
|
delete |
|
noexcept |
raii::Targeted_stringstream::~Targeted_stringstream | ( | ) |
|
delete |
|
noexcept |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |