byteme
C++ wrappers for buffered inputs
|
Virtual class for reading bytes from a source. More...
#include <Reader.hpp>
Public Member Functions | |
virtual bool | load ()=0 |
virtual const unsigned char * | buffer () const =0 |
virtual std::size_t | available () const =0 |
Virtual class for reading bytes from a source.
|
pure virtual |
This method should only be called after load()
has been called and returns true
. The return value is generally expected to be positive; however, it is possible to return a zero. Note that zero values should not be interpreted as the end of the source, which is strictly only defined by load()
returning false
.
buffer()
. Implemented in byteme::ChunkedBufferReader, byteme::GzipFileReader, byteme::IstreamReader< Pointer_ >, byteme::RawBufferReader, byteme::RawFileReader, byteme::SomeBufferReader, byteme::SomeFileReader, and byteme::ZlibBufferReader.
|
pure virtual |
This method should only be called after load()
has been called and returns true
.
available()
. Implemented in byteme::ChunkedBufferReader, byteme::GzipFileReader, byteme::IstreamReader< Pointer_ >, byteme::RawBufferReader, byteme::RawFileReader, byteme::SomeBufferReader, byteme::SomeFileReader, and byteme::ZlibBufferReader.
|
pure virtual |
Read the next chunk of bytes from the input source. To read the entire source, this function should be called repeatedly until false
is returned. After returning false
once, the behavior of subsequent calls is undefined.
false
, it can be assumed that the end of the source was reached. Implemented in byteme::ChunkedBufferReader, byteme::GzipFileReader, byteme::IstreamReader< Pointer_ >, byteme::RawBufferReader, byteme::RawFileReader, byteme::SomeBufferReader, byteme::SomeFileReader, and byteme::ZlibBufferReader.