|
Pottu
|
Readonly access to a tdr file with some helpers. More...
#include <TDRFile.hpp>
Public Member Functions | |
| TDRFile (const std::string &path) | |
| Sets the filename. More... | |
| void | open () |
| Opens the file and sets file information. More... | |
| void | close () |
| Closes the file. More... | |
| size_t | readBlock (uint8_t *buf) |
| Reads next block. More... | |
| const GZFile & | getGZFile () const noexcept |
| bool | isOpen () const noexcept |
| bool | isEof () const noexcept |
| bool | isZipped () const noexcept |
| bool | isWordSwapRequired () const noexcept |
| uint32_t | getBlocksize () const noexcept |
| int64_t | getFilesize () const noexcept |
| const std::string & | getPath () const noexcept |
| const ebyedataheader_t & | getLastHeader () const noexcept |
Readonly access to a tdr file with some helpers.
|
inline |
Sets the filename.
This will not open the file. Only filename is set. No check is made if the file is there.
|
inline |
Closes the file.
File is closed if it is open. isZipped and isWordSwapRequired and getBlocksize methods will still be valid and remember their values.
|
inline |
Opens the file and sets file information.
Will throw std::runtime_error if file cannot be opened or if the file is not valid tdrfile.
If file is not open currently this will open the file and set blocksize, numOfBlocks (if not gzipped).
|
inline |
Reads next block.
| buf | Pointer to a buffer. Size must |