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

MacBinary is an alternative format to AppleSingle for representing a Macintosh file on a non-Macintosh filesystem. More...

#include <macos.h>

Inheritance diagram for Apple::MacBinary:
Linker::Format Linker::Contents

Public Types

enum  version_t { MACBIN1 , MACBIN1_GETINFO , MACBIN2 = 0x11 , MACBIN3 = 0x12 }
 

Public Member Functions

 MacBinary (version_t version=MACBIN3)
 
 MacBinary (version_t version, version_t minimum_version)
 
 MacBinary (std::shared_ptr< AppleSingleDouble > apple, version_t version, version_t minimum_version)
 
void CRC_Initialize () const
 
void CRC_Step (uint8_t byte=0) const
 
void Skip (Linker::Writer &wr, size_t count) const
 
void WriteData (Linker::Writer &wr, size_t count, const void *data) const
 
void WriteData (Linker::Writer &wr, size_t count, std::string text) const
 
void WriteWord (Linker::Writer &wr, size_t bytes, uint64_t value) const
 
void ReadHeader (Linker::Reader &rd)
 
void WriteHeader (Linker::Writer &wr) const
 
void CalculateValues ()
 
void ReadFile (Linker::Reader &rd) override
 Loads file into memory.
 
offset_t WriteFile (Linker::Writer &wr) const override
 Stores data in memory to file.
 
void Dump (Dumper::Dumper &dump) const override
 Display file contents in a nice manner.
 
- Public Member Functions inherited from Linker::Format
 Format (offset_t file_offset=0)
 
virtual void Clear ()
 Resets all fields to their default values, deallocate memory.
 
offset_t ImageSize () const override
 Retrieves size of stored data.
 
offset_t WriteFile (Writer &wr, offset_t count, offset_t offset=0) const override
 Writes data of non-zero filled sections.
 
- Public Member Functions inherited from Linker::Contents
virtual std::shared_ptr< const ImageAsImage () const
 Retrieves a randomly accessible image.
 
std::shared_ptr< ImageAsImage ()
 Retrieves a randomly accessible image.
 

Public Attributes

std::shared_ptr< AppleSingleDoubleapple_single
 
version_t version
 
version_t minimum_version
 
uint16_t secondary_header_size = 0
 
uint16_t crc = 0
 
uint8_t attributes = 0
 
uint32_t creation = 0
 
uint32_t modification = 0
 
uint32_t data_fork_length = 0
 
uint32_t resource_fork_length = 0
 
uint16_t comment_length = 0
 
std::string generated_file_name
 
- Public Attributes inherited from Linker::Format
offset_t file_offset
 

Static Public Attributes

static uint16_t crc_step [256]
 

Detailed Description

MacBinary is an alternative format to AppleSingle for representing a Macintosh file on a non-Macintosh filesystem.

Member Function Documentation

◆ Dump()

void MacBinary::Dump ( Dumper::Dumper dump) const
overridevirtual

Display file contents in a nice manner.

Reimplemented from Linker::Format.

◆ ReadFile()

void MacBinary::ReadFile ( Linker::Reader rd)
overridevirtual

Loads file into memory.

Implements Linker::Format.

◆ WriteFile()

offset_t MacBinary::WriteFile ( Linker::Writer wr) const
overridevirtual

Stores data in memory to file.

Implements Linker::Format.


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