#include <genesis/utils/io/string_output_target.hpp>
Inherits BaseOutputTarget.
Output target for writing data to a string.
The string that is written to is kept by reference in this class. Hence, it has to stay alive for the duration of the data writing process where this class is used. Internally, the data is buffered in a stringstream, and only written to the string on destruction of this class.
Definition at line 54 of file string_output_target.hpp.
Public Member Functions | |
StringOutputTarget (std::string &target) | |
Construct the output target to a string that is modified. More... | |
StringOutputTarget (StringOutputTarget &&)=delete | |
StringOutputTarget (StringOutputTarget const &)=delete | |
~StringOutputTarget () override | |
StringOutputTarget & | operator= (StringOutputTarget &&)=delete |
StringOutputTarget & | operator= (StringOutputTarget const &)=delete |
Public Member Functions inherited from BaseOutputTarget | |
BaseOutputTarget ()=default | |
BaseOutputTarget (BaseOutputTarget &&)=default | |
BaseOutputTarget (BaseOutputTarget const &)=default | |
virtual | ~BaseOutputTarget () |
std::ostream & | flush () |
Flush output stream buffer. More... | |
template<typename T > | |
BaseOutputTarget & | operator<< (T const &content) |
Output stream operator template that simply forwards to the underlying ostream() object. More... | |
BaseOutputTarget & | operator= (BaseOutputTarget &&)=default |
BaseOutputTarget & | operator= (BaseOutputTarget const &)=default |
std::ostream & | ostream () |
Get the underlying output stream that is used for writing. More... | |
std::string | target_name () const |
Get a name of the output target. This is intended for user output. More... | |
std::string | target_string () const |
Get a string representing the output target. More... | |
|
inlineexplicit |
Construct the output target to a string that is modified.
Definition at line 65 of file string_output_target.hpp.
|
delete |
|
delete |
|
inlineoverride |
Definition at line 75 of file string_output_target.hpp.
|
delete |
|
delete |