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) | |
Reader (offset_t start_offset, offset_t maximum_size, EndianType endiantype, std::istream *in=nullptr) | |
Reader | CreateWindow (offset_t new_start_offset, offset_t new_maximum_size=offset_t(-1)) |
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. | |
template<class T , std::size_t N> | |
void | ReadData (std::array< T, N > &data, size_t offset=0) |
Read in a sequence of bytes. | |
std::string | ReadASCII (char terminator, size_t maximum=size_t(-1)) |
Read an ASCII string up to a terminator. | |
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. | |
A helper class, encapsulating functionality needed to import binary data.