#include <genesis/utils/io/input_reader.hpp>
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 &&)=default | |
SynchronousReader (SynchronousReader const &)=delete | |
~SynchronousReader ()=default | |
std::string | class_name () const |
long | finish_reading () |
void | init (std::shared_ptr< BaseInputSource > input_source) |
BaseInputSource const * | input_source () const |
SynchronousReader & | operator= (SynchronousReader &&)=default |
SynchronousReader & | operator= (SynchronousReader const &)=delete |
void | start_reading (char *target_buffer, long target_size) |
bool | valid () const |
|
default |
|
default |
|
delete |
|
default |
|
inline |
Definition at line 373 of file input_reader.hpp.
|
inline |
Definition at line 388 of file input_reader.hpp.
|
inline |
Definition at line 358 of file input_reader.hpp.
|
inline |
Definition at line 368 of file input_reader.hpp.
|
default |
|
delete |
|
inline |
Definition at line 382 of file input_reader.hpp.
|
inline |
Definition at line 363 of file input_reader.hpp.