A library for working with phylogenetic and population genetic data.
v0.32.0
MatrixSimpleReader< T > Class Template Reference

#include <genesis/utils/containers/matrix/simple_reader.hpp>

Detailed Description

template<typename T>
class genesis::utils::MatrixSimpleReader< T >

Definition at line 60 of file utils/containers/matrix/simple_reader.hpp.

Public Member Functions

 MatrixSimpleReader (char separator_char='\t')
 
 MatrixSimpleReader (MatrixSimpleReader &&)=default
 
 MatrixSimpleReader (MatrixSimpleReader const &)=default
 
 ~MatrixSimpleReader ()=default
 
MatrixSimpleReaderconvert_value_functor (std::function< T(std::string const &)> functor)
 
MatrixSimpleReaderoperator= (MatrixSimpleReader &&)=default
 
MatrixSimpleReaderoperator= (MatrixSimpleReader const &)=default
 
MatrixSimpleReaderparse_value_functor (std::function< T(utils::InputStream &)> functor)
 Provide a function to parse an InputStream and return a value of the Matrix. More...
 
Matrix< T > read (std::shared_ptr< BaseInputSource > source) const
 
char separator_char () const
 
MatrixSimpleReaderseparator_char (char value)
 
bool skip_first_col () const
 
MatrixSimpleReaderskip_first_col (bool value)
 
bool skip_first_row () const
 
MatrixSimpleReaderskip_first_row (bool value)
 

Constructor & Destructor Documentation

◆ MatrixSimpleReader() [1/3]

MatrixSimpleReader ( char  separator_char = '\t')
inlineexplicit

Definition at line 68 of file utils/containers/matrix/simple_reader.hpp.

◆ ~MatrixSimpleReader()

~MatrixSimpleReader ( )
default

◆ MatrixSimpleReader() [2/3]

MatrixSimpleReader ( MatrixSimpleReader< T > const &  )
default

◆ MatrixSimpleReader() [3/3]

MatrixSimpleReader ( MatrixSimpleReader< T > &&  )
default

Member Function Documentation

◆ convert_value_functor()

MatrixSimpleReader& convert_value_functor ( std::function< T(std::string const &)>  functor)
inline

Definition at line 138 of file utils/containers/matrix/simple_reader.hpp.

◆ operator=() [1/2]

MatrixSimpleReader& operator= ( MatrixSimpleReader< T > &&  )
default

◆ operator=() [2/2]

MatrixSimpleReader& operator= ( MatrixSimpleReader< T > const &  )
default

◆ parse_value_functor()

MatrixSimpleReader& parse_value_functor ( std::function< T(utils::InputStream &)>  functor)
inline

Provide a function to parse an InputStream and return a value of the Matrix.

The parser functor is expected to leave the stream at the next character, that is, either the separator char, end of line, or end of file.

Definition at line 132 of file utils/containers/matrix/simple_reader.hpp.

◆ read()

Matrix<T> read ( std::shared_ptr< BaseInputSource source) const
inline

Definition at line 83 of file utils/containers/matrix/simple_reader.hpp.

◆ separator_char() [1/2]

char separator_char ( ) const
inline

Definition at line 93 of file utils/containers/matrix/simple_reader.hpp.

◆ separator_char() [2/2]

MatrixSimpleReader& separator_char ( char  value)
inline

Definition at line 108 of file utils/containers/matrix/simple_reader.hpp.

◆ skip_first_col() [1/2]

bool skip_first_col ( ) const
inline

Definition at line 98 of file utils/containers/matrix/simple_reader.hpp.

◆ skip_first_col() [2/2]

MatrixSimpleReader& skip_first_col ( bool  value)
inline

Definition at line 114 of file utils/containers/matrix/simple_reader.hpp.

◆ skip_first_row() [1/2]

bool skip_first_row ( ) const
inline

Definition at line 103 of file utils/containers/matrix/simple_reader.hpp.

◆ skip_first_row() [2/2]

MatrixSimpleReader& skip_first_row ( bool  value)
inline

Definition at line 120 of file utils/containers/matrix/simple_reader.hpp.


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