A library for working with phylogenetic and population genetic data.
v0.27.0
StreamOutputTarget Class Referencefinal

#include <genesis/utils/io/stream_output_target.hpp>

Inherits BaseOutputTarget.

Detailed Description

Output target for writing data to a stream.

The stream 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.

Definition at line 52 of file stream_output_target.hpp.

Public Member Functions

 StreamOutputTarget (std::ostream &target)
 Construct the output target to a string that is modified. More...
 
 StreamOutputTarget (StreamOutputTarget &&)=default
 
 StreamOutputTarget (StreamOutputTarget const &)=default
 
 ~StreamOutputTarget () override=default
 
StreamOutputTargetoperator= (StreamOutputTarget &&)=default
 
StreamOutputTargetoperator= (StreamOutputTarget const &)=default
 
- Public Member Functions inherited from BaseOutputTarget
 BaseOutputTarget ()=default
 
 BaseOutputTarget (BaseOutputTarget &&)=default
 
 BaseOutputTarget (BaseOutputTarget const &)=default
 
virtual ~BaseOutputTarget ()
 
template<typename T >
BaseOutputTargetoperator<< (T const &content)
 Output stream operator template that simply forwards to the underlying ostream() object. More...
 
BaseOutputTargetoperator= (BaseOutputTarget &&)=default
 
BaseOutputTargetoperator= (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. This is intended for the writer classes, which for example might want to examine the output file name. More...
 

Constructor & Destructor Documentation

◆ StreamOutputTarget() [1/3]

StreamOutputTarget ( std::ostream &  target)
inlineexplicit

Construct the output target to a string that is modified.

Definition at line 63 of file stream_output_target.hpp.

◆ StreamOutputTarget() [2/3]

StreamOutputTarget ( StreamOutputTarget const &  )
default

◆ StreamOutputTarget() [3/3]

◆ ~StreamOutputTarget()

~StreamOutputTarget ( )
overridedefault

Member Function Documentation

◆ operator=() [1/2]

StreamOutputTarget& operator= ( StreamOutputTarget &&  )
default

◆ operator=() [2/2]

StreamOutputTarget& operator= ( StreamOutputTarget const &  )
default

The documentation for this class was generated from the following file: