A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 332 of file input_reader.hpp.

Public Member Functions

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

Constructor & Destructor Documentation

SynchronousReader ( )
default
~SynchronousReader ( )
default
SynchronousReader ( SynchronousReader const &  )
delete

Member Function Documentation

std::string class_name ( ) const
inline

Definition at line 368 of file input_reader.hpp.

int finish_reading ( )
inline

Definition at line 383 of file input_reader.hpp.

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

Definition at line 353 of file input_reader.hpp.

BaseInputSource const* input_source ( ) const
inline

Definition at line 363 of file input_reader.hpp.

SynchronousReader& operator= ( SynchronousReader const &  )
delete
SynchronousReader& operator= ( SynchronousReader &&  )
default
void start_reading ( char *  target_buffer,
int  target_size 
)
inline

Definition at line 377 of file input_reader.hpp.

bool valid ( ) const
inline

Definition at line 358 of file input_reader.hpp.


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