The RawFileReader class.
More...
#include <RawFileReader.h>
The RawFileReader class.
Super-simple wrapper for reading binary files, even if they are compressed. Possible IO errors are propagated as exceptions
◆ ~RawFileReader()
| ant::RawFileReader::~RawFileReader |
( |
| ) |
|
|
virtual |
◆ eof()
| bool ant::RawFileReader::eof |
( |
| ) |
const |
|
inline |
eof indicate end of file
- Returns
- true if last read went beyond end of file.
Note that reading the exact number of bytes makes eof() stay false
◆ expand_buffer()
| void ant::RawFileReader::expand_buffer |
( |
std::vector< std::uint32_t > & |
buffer, |
|
|
size_t |
totalSize |
|
) |
| |
|
inline |
◆ gcount()
| std::streamsize ant::RawFileReader::gcount |
( |
| ) |
const |
|
inline |
gcount
- Returns
- number of bytes read
◆ open()
| void RawFileReader::open |
( |
const std::string & |
filename, |
|
|
const size_t |
inbufsize = BUFSIZ |
|
) |
| |
open the given filename
- Parameters
-
| filename | |
| inbufsize | Parameter inbufsize is ignored if non-compressed data is read |
◆ operator bool()
| ant::RawFileReader::operator bool |
( |
| ) |
const |
|
inlineexplicit |
operator bool
is false if the reader has a problem
◆ PercentDone()
| double RawFileReader::PercentDone |
( |
| ) |
const |
◆ read() [1/2]
| void ant::RawFileReader::read |
( |
char * |
s, |
|
|
std::streamsize |
n |
|
) |
| |
|
inline |
read n bytes to buffer s
- Parameters
-
| s | buffer (must be allocated by caller) |
| n | |
◆ read() [2/2]
| void ant::RawFileReader::read |
( |
std::uint32_t * |
s, |
|
|
std::streamsize |
n |
|
) |
| |
|
inline |
◆ reset()
| void ant::RawFileReader::reset |
( |
| ) |
|
|
inline |
reset file stream pointer
resets the pointer for a file stream to the beginning of the file in case of compressed files the decoder gets initialized again
The documentation for this class was generated from the following files: