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

A buffer that can be used to read and store data from a file. More...

#include <buffer.h>

Inheritance diagram for Linker::Buffer:
Linker::Writable Linker::Section

Public Member Functions

 Buffer (size_t size)
 
offset_t ActualDataSize () override
 Retrieves size of stored data.
 
void ReadFile (Reader &rd)
 
void ReadFile (Reader &rd, offset_t count)
 
offset_t WriteFile (Writer &wr, offset_t count, offset_t offset=0) override
 Writes data of non-zero filled sections.
 
int GetByte (offset_t offset) override
 Retrieve byte at a certain offset (optional, might not be defined)
 
virtual offset_t WriteFile (Writer &wr, offset_t count, offset_t offset=0)=0
 Writes data of non-zero filled sections.
 
offset_t WriteFile (Writer &wr)
 Writes data of non-zero filled sections.
 
- Public Member Functions inherited from Linker::Writable
offset_t WriteFile (Writer &wr)
 Writes data of non-zero filled sections.
 

Static Public Member Functions

static std::shared_ptr< BufferReadFromFile (Reader &rd)
 
static std::shared_ptr< BufferReadFromFile (Reader &rd, offset_t count)
 

Protected Attributes

std::vector< uint8_t > data
 

Friends

class Section
 

Detailed Description

A buffer that can be used to read and store data from a file.

Member Function Documentation

◆ ActualDataSize()

offset_t Buffer::ActualDataSize ( )
overridevirtual

Retrieves size of stored data.

Implements Linker::Writable.

◆ GetByte()

int Buffer::GetByte ( offset_t offset)
overridevirtual

Retrieve byte at a certain offset (optional, might not be defined)

Reimplemented from Linker::Writable.

Reimplemented in Linker::Section.

◆ WriteFile() [1/2]

offset_t Buffer::WriteFile ( Writer & wr,
offset_t count,
offset_t offset = 0 )
overridevirtual

Writes data of non-zero filled sections.

Implements Linker::Writable.

◆ WriteFile() [2/2]

virtual offset_t Linker::Writable::WriteFile ( Writer & wr,
offset_t count,
offset_t offset = 0 )
virtual

Writes data of non-zero filled sections.

Implements Linker::Writable.


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