Reader of flat records.
More...
#include <tkrzw_file_util.h>
◆ FlatRecordReader()
tkrzw::FlatRecordReader::FlatRecordReader |
( |
File * |
file, |
|
|
size_t |
buffer_size = 0 |
|
) |
| |
Constructor.
- Parameters
-
file | A file object to read. Ownership is not taken. |
buffer_size | The initial size of the buffer. 0 means the default buffer size 32768 is set. |
◆ ~FlatRecordReader()
tkrzw::FlatRecordReader::~FlatRecordReader |
( |
| ) |
|
◆ Read()
Reads a record.
- Parameters
-
str | The pointer to a string_view object which stores the result. The region is available until this method is called again or this object is deleted. |
rec_type | The pointer to a variable into which the record type is assigned. If it is nullptr, it is ignored. |
- Returns
- The result status. NOT_FOUND_ERROR is returned at the end of file.
◆ DEFAULT_BUFFER_SIZE
constexpr size_t tkrzw::FlatRecordReader::DEFAULT_BUFFER_SIZE = 32768 |
|
staticconstexpr |
The initial size of the input buffer.