A toolkit for working with phylogenetic data.
v0.24.0
BaseInputSource Class Referenceabstract

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

Inherited by FileInputSource, GzipInputSource, StreamInputSource, and StringInputSource.

Detailed Description

Abstract base class for reading byte data from input sources.

It offers to read() a certain amount of bytes into a char buffer.

Definition at line 50 of file base_input_source.hpp.

Public Member Functions

 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

◆ BaseInputSource() [1/3]

BaseInputSource ( )
default

◆ BaseInputSource() [2/3]

BaseInputSource ( BaseInputSource const &  )
default

◆ BaseInputSource() [3/3]

BaseInputSource ( BaseInputSource &&  )
default

◆ ~BaseInputSource()

virtual ~BaseInputSource ( )
inlinevirtual

Definition at line 66 of file base_input_source.hpp.

Member Function Documentation

◆ operator=() [1/2]

BaseInputSource& operator= ( BaseInputSource const &  )
default

◆ operator=() [2/2]

BaseInputSource& operator= ( BaseInputSource &&  )
default

◆ read()

size_t read ( char *  buffer,
size_t  size 
)
inline

Read size many bytes into the char buffer.

Definition at line 76 of file base_input_source.hpp.

◆ source_name()

std::string source_name ( ) const
inline

Get a name of the input source. This is intended for user output.

Definition at line 85 of file base_input_source.hpp.

◆ source_string()

std::string source_string ( ) const
inline

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.

Definition at line 95 of file base_input_source.hpp.


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