A toolkit for working with phylogenetic data.
v0.24.0
SynchronousReader Class Reference

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

Detailed Description

Read bytes from an InputSource into a char buffer.

The reading is done synchronously, that is, reading occurs on request. This is usually slower than asynchronous reading (see AsynchronousReader).

This class is always available. If threading is not available (that is, if the GENESIS_PTHREADS macro definition is not set), the InputReader typedef is an alias for this class.

Implementation details inspired by fast-cpp-csv-parser by Ben Strasser, see also Acknowledgements.

Definition at line 337 of file input_reader.hpp.

Public Member Functions

 SynchronousReader ()=default
 
 SynchronousReader (SynchronousReader const &)=delete
 
 SynchronousReader (SynchronousReader &&)=default
 
 ~SynchronousReader ()=default
 
std::string class_name () const
 
long finish_reading ()
 
void init (std::shared_ptr< BaseInputSource > input_source)
 
BaseInputSource const * input_source () const
 
SynchronousReaderoperator= (SynchronousReader const &)=delete
 
SynchronousReaderoperator= (SynchronousReader &&)=default
 
void start_reading (char *target_buffer, long target_size)
 
bool valid () const
 

Constructor & Destructor Documentation

◆ SynchronousReader() [1/3]

SynchronousReader ( )
default

◆ ~SynchronousReader()

~SynchronousReader ( )
default

◆ SynchronousReader() [2/3]

SynchronousReader ( SynchronousReader const &  )
delete

◆ SynchronousReader() [3/3]

Member Function Documentation

◆ class_name()

std::string class_name ( ) const
inline

Definition at line 373 of file input_reader.hpp.

◆ finish_reading()

long finish_reading ( )
inline

Definition at line 388 of file input_reader.hpp.

◆ init()

void init ( std::shared_ptr< BaseInputSource input_source)
inline

Definition at line 358 of file input_reader.hpp.

◆ input_source()

BaseInputSource const* input_source ( ) const
inline

Definition at line 368 of file input_reader.hpp.

◆ operator=() [1/2]

SynchronousReader& operator= ( SynchronousReader const &  )
delete

◆ operator=() [2/2]

SynchronousReader& operator= ( SynchronousReader &&  )
default

◆ start_reading()

void start_reading ( char *  target_buffer,
long  target_size 
)
inline

Definition at line 382 of file input_reader.hpp.

◆ valid()

bool valid ( ) const
inline

Definition at line 363 of file input_reader.hpp.


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