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
Linker::Writer Class Referenceabstract

Abstract base class that encapsulates functionality needed to export binary data. More...

#include <writer.h>

Inheritance diagram for Linker::Writer:
Linker::BufferWriter Linker::StreamWriter Linker::WindowWriter OMF::ChecksumWriter

Public Member Functions

 Writer (EndianType endiantype)
 
virtual void WriteData (size_t count, const void *data)=0
 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.
 
template<class T , std::size_t N>
void WriteData (const std::array< T, N > &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)
 Write a word.
 
void WriteWord (size_t bytes, uint64_t value)
 Write a word.
 
template<typename Clock >
void WriteTimestamp (Timestamp< Clock > timestamp, EndianType endiantype)
 Write a date-time value according to some epoch.
 
template<typename Clock >
void WriteTimestamp (Timestamp< Clock > timestamp)
 Write a date-time value according to some epoch.
 
virtual void Seek (offset_t offset)=0
 Jump to a specific location in the ouput stream.
 
virtual void Skip (relative_offset_t offset)=0
 Jump to a distance in the output stream.
 
virtual void SeekEnd (relative_offset_t offset=0)=0
 Jump to a specific offset from the end.
 
virtual offset_t Tell ()=0
 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.
 

Detailed Description

Abstract base class that encapsulates functionality needed to export binary data.

Member Function Documentation

◆ Seek()

virtual void Linker::Writer::Seek ( offset_t  offset)
pure virtual

Jump to a specific location in the ouput stream.

Implemented in OMF::ChecksumWriter, Linker::StreamWriter, Linker::WindowWriter, and Linker::BufferWriter.

◆ SeekEnd()

virtual void Linker::Writer::SeekEnd ( relative_offset_t  offset = 0)
pure virtual

Jump to a specific offset from the end.

Implemented in OMF::ChecksumWriter, Linker::StreamWriter, Linker::WindowWriter, and Linker::BufferWriter.

◆ Skip()

virtual void Linker::Writer::Skip ( relative_offset_t  offset)
pure virtual

Jump to a distance in the output stream.

Implemented in OMF::ChecksumWriter, Linker::StreamWriter, Linker::WindowWriter, and Linker::BufferWriter.

◆ Tell()

virtual offset_t Linker::Writer::Tell ( )
pure virtual

Retrieve the current location.

Implemented in OMF::ChecksumWriter, Linker::StreamWriter, Linker::WindowWriter, and Linker::BufferWriter.

◆ WriteData()

virtual void Linker::Writer::WriteData ( size_t  count,
const void *  data 
)
pure virtual

Write out a sequence of bytes.

Implemented in OMF::ChecksumWriter, Linker::StreamWriter, Linker::WindowWriter, and Linker::BufferWriter.


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