1 #ifndef GENESIS_UTILS_IO_BASE_OUTPUT_TARGET_H_ 2 #define GENESIS_UTILS_IO_BASE_OUTPUT_TARGET_H_ 82 out_stream_() << content;
101 return target_name_();
111 return target_string_();
120 virtual std::ostream& out_stream_() = 0;
122 virtual std::string target_name_()
const = 0;
123 virtual std::string target_string_()
const = 0;
130 #endif // include guard virtual ~BaseOutputTarget()
Abstract base class for writing data to an output target.
BaseOutputTarget()=default
BaseOutputTarget & operator<<(T const &content)
Output stream operator template that simply forwards to the underlying ostream() object.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
BaseOutputTarget & operator=(BaseOutputTarget const &)=default
std::string target_name() const
Get a name of the output target. This is intended for user output.
std::ostream & ostream()
Get the underlying output stream that is used for writing.
std::string target_string() const
Get a string representing the output target. This is intended for the writer classes, which for example might want to examine the output file name.
Provides functions for accessing the file system.