A toolkit for working with phylogenetic data.
v0.24.0
StreamInputSource Class Referencefinal

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

Inherits BaseInputSource.

Detailed Description

Input source for reading byte data from an istream.

The input stream is provided via the constructor. It is not owned by this class, thus the owner must keep it alive as long as reading from it is required, and is responsbile for destroying it. This class merely keeps a reference to it.

Definition at line 56 of file stream_input_source.hpp.

Public Member Functions

 StreamInputSource (std::istream &in)
 Construct the input source from an std::istream. More...
 
 StreamInputSource (StreamInputSource const &)=default
 
 StreamInputSource (StreamInputSource &&)=default
 
 ~StreamInputSource () override
 
StreamInputSourceoperator= (StreamInputSource const &)=default
 
StreamInputSourceoperator= (StreamInputSource &&)=default
 
- Public Member Functions inherited from BaseInputSource
 BaseInputSource ()=default
 
 BaseInputSource (BaseInputSource const &)=default
 
 BaseInputSource (BaseInputSource &&)=default
 
virtual ~BaseInputSource ()
 
BaseInputSourceoperator= (BaseInputSource const &)=default
 
BaseInputSourceoperator= (BaseInputSource &&)=default
 
size_t read (char *buffer, size_t size)
 Read size many bytes into the char buffer. More...
 
std::string source_name () const
 Get a name of the input source. This is intended for user output. More...
 
std::string source_string () const
 Get a string representing the input source. This is intended for the reader classes, which for example might want to examine the input file name. More...
 

Constructor & Destructor Documentation

◆ StreamInputSource() [1/3]

StreamInputSource ( std::istream &  in)
inlineexplicit

Construct the input source from an std::istream.

Definition at line 67 of file stream_input_source.hpp.

◆ StreamInputSource() [2/3]

StreamInputSource ( StreamInputSource const &  )
default

◆ StreamInputSource() [3/3]

◆ ~StreamInputSource()

~StreamInputSource ( )
inlineoverride

Definition at line 77 of file stream_input_source.hpp.

Member Function Documentation

◆ operator=() [1/2]

StreamInputSource& operator= ( StreamInputSource const &  )
default

◆ operator=() [2/2]

StreamInputSource& operator= ( StreamInputSource &&  )
default

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