RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
A helper class, encapsulating functionality needed to import binary data. More...
#include <reader.h>
Public Member Functions | |
Reader (EndianType endiantype, std::istream *in=nullptr) | |
void | ReadData (size_t count, void *data) |
Read in a sequence of bytes. | |
void | ReadData (size_t count, std::vector< uint8_t > &data, size_t offset=0) |
Read in a sequence of bytes, resize the vector. | |
void | ReadData (std::vector< uint8_t > &data, size_t offset=0) |
Read in a sequence of bytes, filling the vector. | |
std::string | ReadData (size_t count, bool terminate_at_null=false) |
Read in a sequence of bytes. | |
std::string | ReadASCIIZ (size_t maximum=(size_t) -1) |
Read a zero terminated ASCII string. | |
uint64_t | ReadUnsigned (size_t bytes, EndianType endiantype) |
Read an unsigned word. | |
uint64_t | ReadUnsigned (size_t bytes) |
Read an unsigned word. | |
uint64_t | ReadSigned (size_t bytes, EndianType endiantype) |
Read a signed word. | |
uint64_t | ReadSigned (size_t bytes) |
Read a signed word. | |
void | Seek (offset_t offset) |
Jump to a specific location in the input stream. | |
void | Skip (offset_t offset) |
Jump to a distance in the input stream. | |
void | SeekEnd (relative_offset_t offset=0) |
Jump to end of the input stream. | |
offset_t | Tell () |
Retrieve the current location. | |
Public Attributes | |
EndianType | endiantype |
The default endianness of the binary format, used for reading multibyte numeric data. | |
std::istream * | in |
The input stream. | |
A helper class, encapsulating functionality needed to import binary data.