RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
A helper class, encapsulating functionality needed to export binary data. More...
#include <writer.h>
Public Member Functions | |
Writer (EndianType endiantype, std::ostream *out=nullptr) | |
void | WriteData (size_t count, const void *data) |
Write out a sequence of bytes. | |
size_t | WriteData (size_t max_count, const std::vector< uint8_t > &data, size_t offset=0) |
Write out a sequence of bytes. | |
size_t | WriteData (const std::vector< uint8_t > &data, size_t offset=0) |
Write out a sequence of bytes. | |
void | WriteData (size_t count, std::string text, char padding='\0') |
Write a string, possibly truncated or zero padded. | |
void | WriteData (std::string text) |
Write a string. | |
void | WriteData (size_t count, std::istream &in) |
Write data using an input stream as the source of data. | |
void | WriteWord (size_t bytes, uint64_t value, EndianType endiantype) |
Read a word. | |
void | WriteWord (size_t bytes, uint64_t value) |
Read a word. | |
void | Seek (offset_t offset) |
Jump to a specific location in the ouput stream. | |
void | Skip (offset_t offset) |
Jump to a distance in the output stream. | |
void | SeekEnd (offset_t offset=0) |
Jump to a specific offset from the end. | |
offset_t | Tell () |
Retrieve the current location. | |
void | FillTo (offset_t position) |
Move to a specific offset, fill with zeroes if needed. | |
void | AlignTo (offset_t align) |
Align the current pointer. | |
Public Attributes | |
EndianType | endiantype |
The default endianness of the binary format, used for reading multibyte numeric data. | |
std::ostream * | out |
The input stream. | |
Protected Member Functions | |
void | ForceSeek (offset_t offset) |
A helper class, encapsulating functionality needed to export binary data.