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

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

Inherits BaseOutputTarget.

Detailed Description

Output target for writing data to a file.

The output file name is provided via the constructor.

Definition at line 53 of file file_output_target.hpp.

Public Member Functions

 FileOutputTarget (FileOutputTarget &&)=default
 
 FileOutputTarget (FileOutputTarget const &)=delete
 
 FileOutputTarget (std::string const &file_name, std::ios_base::openmode mode=std::ios_base::out)
 Construct the output target from a file with the given file name. More...
 
 ~FileOutputTarget () override=default
 
FileOutputTargetoperator= (FileOutputTarget &&)=default
 
FileOutputTargetoperator= (FileOutputTarget const &)=delete
 
- 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

◆ FileOutputTarget() [1/3]

FileOutputTarget ( std::string const &  file_name,
std::ios_base::openmode  mode = std::ios_base::out 
)
inlineexplicit

Construct the output target from a file with the given file name.

Definition at line 64 of file file_output_target.hpp.

◆ FileOutputTarget() [2/3]

FileOutputTarget ( FileOutputTarget const &  )
delete

◆ FileOutputTarget() [3/3]

◆ ~FileOutputTarget()

~FileOutputTarget ( )
overridedefault

Member Function Documentation

◆ operator=() [1/2]

FileOutputTarget& operator= ( FileOutputTarget &&  )
default

◆ operator=() [2/2]

FileOutputTarget& operator= ( FileOutputTarget const &  )
delete

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