7#include "pflib/packing/Reader.h"
9namespace pflib::packing {
38 void seek(
int off)
override;
49 bool good()
const override;
50 bool eof()
const override;
This class is a helper class for reading the buffer stored in the raw data format.
Definition BufferReader.h:27
BufferReader(const std::vector< uint8_t > &b)
Initialize a reader by wrapping a buffer to read.
Definition BufferReader.cxx:5
int tell() override
return where in the word we are in bytes
Definition BufferReader.cxx:10
~BufferReader()=default
default destructor so handle to buffer is given up
void seek(int off) override
go to the index off in bytes
Definition BufferReader.cxx:8
Reader & read(char *w, std::size_t count) override
read the next count bytes into array w and move the index
Definition BufferReader.cxx:12
bool eof() const override
check if file is done
Definition BufferReader.cxx:21
bool good() const override
Return state of buffer.
Definition BufferReader.cxx:20
Reading a raw data stream with some underlying backend.
Definition Reader.h:19