|
RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
An abstract interface that separates structure and presentation of the data inside a file. More...
#include <dumper.h>
Public Member Functions | |
| Dumper (std::ostream &out) | |
| SingleByteEncoding * | SetEncoding (SingleByteEncoding &encoding, bool force=false) |
| Encoding * | SetStringEncoding (Encoding &encoding) |
| void | SetTitle (std::string title) |
| void | PrintHex (offset_t value, unsigned width, std::string prefix="0x") |
| Displays a hexadecimal value (default prefix is "0x") | |
| void | PrintDec (offset_t value, std::string prefix="#") |
| Displays a decimal value (default prefix is "#") | |
| void | PrintDecSigned (relative_offset_t value, std::string prefix="#") |
| Displays a decimal value (default prefix is "#") | |
| void | PutChar (char32_t c) |
| Displays a Unicode character as a UTF-8 byte sequence. | |
| void | PutEncodedString (std::string encoded_string, bool terminate_at_null=false) |
| void | PutEncodedString (offset_t width, std::string encoded_string, char32_t padding) |
| void | BeginUnderline () |
| ANSI escape sequence to add underline. | |
| void | EndUnderline () |
| ANSI escape sequence to remove all formatting. | |
Public Attributes | |
| std::ostream & | out |
| bool | use_ansi |
| SingleByteEncoding * | encoding |
| Encoding * | string_encoding |
An abstract interface that separates structure and presentation of the data inside a file.
This class is responsible for actually displaying the contents set up using other classes inside the Dumper namespace. By separating structure and presentation, it is possible to create alternative displays, including machine readable ones, to replace the dumper class. Currently only the default Dumper class is available, but by modifying it here, presentation choices can be made in a single location.