12 this->read_csv_worker.join();
15 if (this->
records->empty())
return this->
end();
36 row = std::move(_row);
48 this->daddy =
nullptr;
57 if (!daddy->read_row(this->row)) {
58 this->daddy =
nullptr;
An input iterator capable of handling large files.
iterator & operator++()
Pre-increment iterator.
Main class for parsing CSVs from files and in-memory sources.
HEDLEY_CONST iterator end() const noexcept
A placeholder for the imaginary past the end row in a CSV.
bool read_row(CSVRow &row)
Retrieve rows as CSVRow objects, returning true if more rows are available.
iterator begin()
Return an iterator to the first row in the reader.
Data structure for representing CSV rows.
#define CSV_INLINE
Helper macro which should be #defined as "inline" in the single header version.
Defines functionality needed for basic CSV parsing.
std::unique_ptr< RowCollection > records
Queue of parsed CSV rows.
size_t _n_rows
How many rows (minus header) have been read so far.
bool read_csv(size_t bytes=internals::ITERATION_CHUNK_SIZE)
Read a chunk of CSV data.
constexpr size_t ITERATION_CHUNK_SIZE
For functions that lazy load a large CSV, this determines how many bytes are read at a time.
The all encompassing namespace.