RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Dumper::Dumper Class Reference

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)
 
void SetEncoding (char32_t(&encoding)[256], bool force=false)
 
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 BeginUnderline ()
 ANSI escape sequence to add underline.
 
void EndUnderline ()
 ANSI escape sequence to remove all formatting.
 

Public Attributes

std::ostream & out
 
bool use_ansi
 
char32_t(* encoding )[256]
 

Detailed Description

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.


The documentation for this class was generated from the following file: