Stream a 1-dimensional HDF5 string dataset into memory.
More...
#include <Stream1dStringDataset.hpp>
Stream a 1-dimensional HDF5 string dataset into memory.
This streams in a 1-dimensional HDF5 string dataset in contiguous blocks, using block sizes defined by pick_1d_block_size()
. Callers can then iterate over the individual strings.
◆ Stream1dStringDataset() [1/2]
ritsuko::hdf5::Stream1dStringDataset::Stream1dStringDataset |
( |
const H5::DataSet * | ptr, |
|
|
hsize_t | length, |
|
|
hsize_t | buffer_size ) |
|
inline |
- Parameters
-
ptr | Pointer to a HDF5 dataset handle. |
length | Length of the dataset as a 1-dimensional vector. |
buffer_size | Size of the buffer for holding streamed blocks of values. Larger buffers improve speed at the cost of some memory efficiency. |
◆ Stream1dStringDataset() [2/2]
ritsuko::hdf5::Stream1dStringDataset::Stream1dStringDataset |
( |
const H5::DataSet * | ptr, |
|
|
hsize_t | buffer_size ) |
|
inline |
Overloaded constructor where the length is automatically determined.
- Parameters
-
ptr | Pointer to a HDF5 dataset handle. |
buffer_size | Size of the buffer for holding streamed blocks of values. |
◆ get()
std::string ritsuko::hdf5::Stream1dStringDataset::get |
( |
| ) |
|
|
inline |
- Returns
- String at the current position of the stream.
◆ length()
hsize_t ritsuko::hdf5::Stream1dStringDataset::length |
( |
| ) |
const |
|
inline |
- Returns
- Length of the dataset.
◆ next()
void ritsuko::hdf5::Stream1dStringDataset::next |
( |
size_t | jump = 1 | ) |
|
|
inline |
Advance to the next position of the stream.
- Parameters
-
jump | Number of positions by which to advance the stream. |
◆ position()
hsize_t ritsuko::hdf5::Stream1dStringDataset::position |
( |
| ) |
const |
|
inline |
- Returns
- Current position on the stream.
◆ steal()
std::string ritsuko::hdf5::Stream1dStringDataset::steal |
( |
| ) |
|
|
inline |
- Returns
- String at the current position of the stream. Unlike
get()
, this avoids a copy by directly acquiring the string, but it invalidates all subsequent get()
and steal()
requests until next()
is called.
The documentation for this class was generated from the following file: