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::Format Class Referenceabstract

A class to encode a general file format. More...

#include <format.h>

Inheritance diagram for Linker::Format:
Linker::Contents Apple::AppleSingleDouble Apple::AppleSingleDouble::Entry Apple::MacBinary Apple::MacintoshResourceFileFormat::Resource Commodore::CommodoreFormat::BASICFile Commodore::CommodoreFormat::BASICLine EPOC::SymbianFormat Java::ClassFormat Linker::InputFormat Linker::OutputFormat MPW::ObjectFormat Microsoft::NTResourceFile Microsoft::ResourceFile OMF::OMFFormat Wasm::WebAssemblyFormat

Public Member Functions

 Format (offset_t file_offset=0)
 
virtual void Clear ()
 Resets all fields to their default values, deallocate memory.
 
virtual void ReadFile (const std::shared_ptr< Reader > &rd)=0
 Loads file into memory.
 
offset_t WriteFile (const std::shared_ptr< Writer > &wr) const override=0
 Stores data in memory to file.
 
virtual void Dump (Dumper::Dumper &dump) const
 Display file contents in a nice manner.
 
virtual void SetFileOffset (offset_t new_offset)
 Attempts to alter the offset to the first byte of the format from the beginning of the file.
 
offset_t ImageSize () const override
 Retrieves the offset of the byte after the last one belonging to this format from the first one.
 
- Public Member Functions inherited from Linker::Contents
virtual std::shared_ptr< const Image > AsImage () const
 Retrieves a randomly accessible image.
 
std::shared_ptr< Image > AsImage ()
 Retrieves a randomly accessible image.
 

Public Attributes

offset_t file_offset
 The offset of the first byte used by this format in the file it is stored in.
 

Detailed Description

A class to encode a general file format.

Member Function Documentation

◆ Clear()

void Format::Clear ( )
virtual

◆ Dump()

void Format::Dump ( Dumper::Dumper &  dump) const
virtual

Display file contents in a nice manner.

Reimplemented in Apple::AppleFormat, Apple::SOSFormat, Apple::AppleDriver, Atari::AtariFormat, Commodore::CommodoreFormat::BASICLine, Commodore::CommodoreFormat::BASICFile, Commodore::CommodoreFormat, DigitalResearch::CPM3Format, DigitalResearch::PRLFormat, FLEX::FLEXFormat, UZI::UZIFormat, UZI::UZI280Format, ARM::AIFFormat, AOut::AOutFormat, Apple::AppleSingleDouble::GenericEntry, Apple::AppleSingleDouble, Apple::RealName, Apple::IconBW, Apple::IconColor, Apple::FileInfo::Macintosh, Apple::FileInfo::ProDOS, Apple::FileInfo::MSDOS, Apple::FileInfo::AUX, Apple::FileDatesInfo, Apple::FinderInfo, Apple::MacintoshFileInfo, Apple::ProDOSFileInfo, Apple::MSDOSFileInfo, Apple::AFPShortName, Apple::AFPFileInfo, Apple::AFPDirectoryID, Apple::MacBinary, Apple::OutputDriver, Archive::ArchiveFormat, AS86Obj::AS86ObjFormat, BFLT::BFLTFormat, Binary::GenericBinaryFormat, Binary::BinaryFormat, DOS16M::BWFormat, COFF::COFFFormat, DigitalResearch::CPM68KFormat, DigitalResearch::CPM86Format, DigitalResearch::CPM8KFormat, CauseWay::CauseWayFormat, SeychellDOS32::AdamFormat, DX64::LVFormat, BorcaD3X::D3X1Format, ELF::ELFFormat, ELF::FatELFFormat, EMX::EMXAOutFormat, EPOC::SymbianFormat, GEOS::GeodeFormat, Apple::OMFFormat, Apple::GSOSResourceFileFormat, X68000::HUFormat, Amiga::HunkFormat, Java::ClassFormat, Microsoft::LEFormat, MachO::MachOFormat, MachO::FatMachOFormat, Apple::MacintoshResourceFileFormat::Resource, Apple::MacintoshResourceFileFormat::GenericResource, Apple::MacintoshResourceFileFormat, MINIX::MINIXFormat, MPW::ObjectFormat, Microsoft::MZFormat, Microsoft::NEFormat, Microsoft::ResourceFile, O65::O65Format, OMF::OMF86Format, OMF::OMF80Format, OMF::OMF51Format, OMF::OMF96Format, OMF::OMFFormatContainer, PCOS::CMDFormat, Microsoft::PEFormat, Microsoft::NTResourceFile, Apple::PEFFormat, Apple::PEFOutputDriver::DataFork, PharLap::MPFormat, PharLap::P3Format, PMODE::PMW1Format, Microsoft::W3Format, Microsoft::W4Format, Wasm::WebAssemblyFormat, Xenix::BOutFormat, Xenix::XOutFormat, Ergo::XPFormat, and Apple::AppleSingleDouble::Entry.

◆ ImageSize()

offset_t Format::ImageSize ( ) const
overridevirtual

◆ ReadFile()

virtual void Linker::Format::ReadFile ( const std::shared_ptr< Reader > &  rd)
pure virtual

Loads file into memory.

Implemented in Apple::AppleFormat, Apple::SOSFormat, Apple::AppleDriver, Atari::AtariFormat, Commodore::CommodoreFormat::BASICLine, Commodore::CommodoreFormat::BASICFile, Commodore::CommodoreFormat, DigitalResearch::CPM3Format, DigitalResearch::PRLFormat, ARM::AIFFormat, AOut::AOutFormat, Apple::AppleSingleDouble, Apple::AppleSingleDouble::GenericEntry, Apple::RealName, Apple::IconBW, Apple::IconColor, Apple::FileInfo::Macintosh, Apple::FileInfo::ProDOS, Apple::FileInfo::MSDOS, Apple::FileInfo::AUX, Apple::FileDatesInfo, Apple::FinderInfo, Apple::MacintoshFileInfo, Apple::ProDOSFileInfo, Apple::MSDOSFileInfo, Apple::AFPShortName, Apple::AFPFileInfo, Apple::AFPDirectoryID, Apple::MacBinary, Apple::OutputDriver, Archive::ArchiveFormat, AS86Obj::AS86ObjFormat, BFLT::BFLTFormat, Binary::GenericBinaryFormat, Binary::BinaryFormat, DOS16M::BWFormat, COFF::COFFFormat, DigitalResearch::CPM68KFormat, DigitalResearch::CPM86Format, DigitalResearch::CPM8KFormat, CauseWay::CauseWayFormat, SeychellDOS32::AdamFormat, DX64::LVFormat, BorcaD3X::D3X1Format, ELF::ELFFormat, ELF::FatELFFormat, EMX::EMXAOutFormat, EPOC::SymbianFormat, GEOS::GeodeFormat, Apple::OMFFormat, Apple::GSOSResourceFileFormat, X68000::HUFormat, Amiga::HunkFormat, Java::ClassFormat, Microsoft::LEFormat, MachO::MachOFormat, MachO::FatMachOFormat, Apple::MacintoshResourceFileFormat::GenericResource, Apple::MacintoshResourceFileFormat::JumpTableCodeResource, Apple::MacintoshResourceFileFormat::CodeResource, Apple::MacintoshResourceFileFormat::SizeResource, Apple::MacintoshResourceFileFormat::CodeFragmentResource, Apple::MacintoshResourceFileFormat, Apple::Classic68KDriver, MINIX::MINIXFormat, MPW::ObjectFormat, Microsoft::MZFormat, Microsoft::NEFormat, Microsoft::ResourceFile, O65::O65Format, OMF::OMF86Format, OMF::OMF80Format, OMF::OMF51Format, OMF::OMF96Format, OMF::OMFFormatContainer, PCOS::CMDFormat, Microsoft::PEFormat, Microsoft::NTResourceFile, Apple::PEFFormat, Apple::RSegResource, Apple::PEFOutputDriver::DataFork, Apple::PEFOutputDriver, PharLap::MPFormat, PharLap::P3Format, PMODE::PMW1Format, Microsoft::W3Format, Microsoft::W4Format, Wasm::WebAssemblyFormat, Xenix::BOutFormat, Xenix::XOutFormat, Ergo::XPFormat, and Apple::AppleSingleDouble::Entry.

◆ WriteFile()

offset_t Linker::Format::WriteFile ( const std::shared_ptr< Writer > &  wr) const
overridepure virtual

Stores data in memory to file.

Implements Linker::Contents.

Implemented in Apple::AppleSingleDouble::GenericEntry, Apple::IconBW, Apple::IconColor, Apple::AppleSingleDouble::Entry, Apple::AppleFormat, Apple::SOSFormat, Atari::AtariFormat, Commodore::CommodoreFormat::BASICLine, Commodore::CommodoreFormat::BASICFile, Commodore::CommodoreFormat, DigitalResearch::CPM3Format, DigitalResearch::PRLFormat, FLEX::FLEXFormat, UZI::UZIFormat, UZI::UZI280Format, ARM::AIFFormat, AOut::AOutFormat, Apple::AppleSingleDouble, Apple::RealName, Apple::FileInfo::Macintosh, Apple::FileInfo::ProDOS, Apple::FileInfo::MSDOS, Apple::FileInfo::AUX, Apple::FileDatesInfo, Apple::FinderInfo, Apple::MacintoshFileInfo, Apple::ProDOSFileInfo, Apple::MSDOSFileInfo, Apple::AFPShortName, Apple::AFPFileInfo, Apple::AFPDirectoryID, Apple::MacBinary, Apple::OutputDriver, Archive::ArchiveFormat, AS86Obj::AS86ObjFormat, BFLT::BFLTFormat, Binary::GenericBinaryFormat, Binary::BinaryFormat, DOS16M::BWFormat, COFF::COFFFormat, DigitalResearch::CPM68KFormat, DigitalResearch::CPM86Format, DigitalResearch::CPM8KFormat, CauseWay::CauseWayFormat, SeychellDOS32::AdamFormat, DX64::LVFormat, BorcaD3X::D3X1Format, ELF::ELFFormat, ELF::FatELFFormat, EMX::EMXAOutFormat, EPOC::SymbianFormat, GEOS::GeodeFormat, Apple::OMFFormat, Apple::GSOSResourceFileFormat, X68000::HUFormat, Amiga::HunkFormat, Java::ClassFormat, Microsoft::LEFormat, MachO::MachOFormat, MachO::FatMachOFormat, Apple::MacintoshResourceFileFormat::GenericResource, Apple::MacintoshResourceFileFormat::JumpTableCodeResource, Apple::MacintoshResourceFileFormat::CodeResource, Apple::MacintoshResourceFileFormat::SizeResource, Apple::MacintoshResourceFileFormat::CodeFragmentResource, Apple::MacintoshResourceFileFormat, MINIX::MINIXFormat, MPW::ObjectFormat, Microsoft::MZFormat, Microsoft::NEFormat, Microsoft::ResourceFile, O65::O65Format, OMF::OMF86Format, OMF::OMF80Format, OMF::OMF51Format, OMF::OMF96Format, OMF::OMFFormatContainer, PCOS::CMDFormat, Microsoft::PEFormat, Microsoft::NTResourceFile, Apple::PEFFormat, Apple::RSegResource, Apple::PEFOutputDriver::DataFork, PharLap::MPFormat, PharLap::P3Format, PharLap::P3Format::Flat, PharLap::P3Format::MultiSegmented, PMODE::PMW1Format, Microsoft::W3Format, Microsoft::W4Format, Wasm::WebAssemblyFormat, Xenix::BOutFormat, Xenix::XOutFormat, and Ergo::XPFormat.


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