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
Apple::ResourceFork::GenericResource Class Reference
Inheritance diagram for Apple::ResourceFork::GenericResource:
Apple::ResourceFork::Resource Linker::OutputFormat Linker::Format

Public Member Functions

 GenericResource (const char type[4], uint16_t id)
 
void ProcessModule (Linker::Module &module) override
 Processes the module object and initializes format fields.
 
void CalculateValues () override
 Intermediate step between processing module and generating output file to set up headers and management sections It is expected that after a module is processed, additional steps are required to evaluate the final values of the fields.
 
offset_t GetLength () override
 
void WriteFile (Linker::Writer &wr) override
 Stores data in memory to file.
 
- Public Member Functions inherited from Apple::ResourceFork::Resource
void ReadFile (Linker::Reader &rd) override
 Loads file into memory.
 
void WriteFile (Linker::Writer &wr) override
 Stores data in memory to file.
 
- Public Member Functions inherited from Linker::OutputFormat
virtual bool AddSupplementaryOutputFormat (std::string subformat)
 If the output format actually drives multiple output formats (resource file, apple double, etc.), specify multiple types, return false if unknown.
 
virtual void SetOptions (std::map< std::string, std::string > &options)
 Passes command line parameters as settings over to format object.
 
std::optional< std::string > FetchOption (std::map< std::string, std::string > &options, std::string name)
 Convenience method to look up option by name.
 
std::string FetchOption (std::map< std::string, std::string > &options, std::string name, std::string default_value)
 Convenience method to look up option by name, returning default value if name is missing.
 
std::optional< offset_t > FetchIntegerOption (std::map< std::string, std::string > &options, std::string name)
 Convenience method to look up option by name and convert it to integer.
 
virtual void SetModel (std::string model)
 Sets the way memory is organized, typically modifying a built-in script.
 
virtual void SetLinkScript (std::string script_file, std::map< std::string, std::string > &options)
 Selects a script file to use for linking.
 
virtual void GenerateFile (std::string filename, Linker::Module &module)
 The main function that handles processing, calculating and generating the final image.
 
virtual std::string GetDefaultExtension (Linker::Module &module, std::string filename)
 Appends a default extension to the filename.
 
virtual std::string GetDefaultExtension (Linker::Module &module)
 Provides a default filename for the output file.
 
virtual bool FormatSupportsSegmentation () const
 Whether the format supports multiple segments.
 
virtual bool FormatIs16bit () const
 Whether the format is 16-bit or not.
 
virtual bool FormatIsLinear () const
 Whether the address space is linear or segmented.
 
virtual bool FormatSupportsResources () const
 Whether the format supports resources.
 
virtual bool FormatSupportsLibraries () const
 Whether the format supports libraries.
 
virtual unsigned FormatAdditionalSectionFlags (std::string section_name) const
 
- 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.
 
virtual void Dump (Dumper::Dumper &dump)
 Display file contents in a nice manner.
 

Public Attributes

std::shared_ptr< Linker::Segmentresource
 
- Public Attributes inherited from Apple::ResourceFork::Resource
char type [4]
 
uint16_t id
 
std::optional< std::string > name
 
uint8_t attributes
 
uint16_t name_offset = 0
 
uint32_t data_offset = 0
 
- Public Attributes inherited from Linker::Format
offset_t file_offset
 

Additional Inherited Members

- Protected Member Functions inherited from Apple::ResourceFork::Resource
 Resource (const char type[4], uint16_t id, uint8_t attributes=0)
 
 Resource (const char type[4], uint16_t id, std::string name, uint8_t attributes=0)
 

Member Function Documentation

◆ CalculateValues()

void ResourceFork::GenericResource::CalculateValues ( )
overridevirtual

Intermediate step between processing module and generating output file to set up headers and management sections It is expected that after a module is processed, additional steps are required to evaluate the final values of the fields.

Reimplemented from Linker::OutputFormat.

◆ GetLength()

offset_t ResourceFork::GenericResource::GetLength ( )
overridevirtual

◆ ProcessModule()

void ResourceFork::GenericResource::ProcessModule ( Linker::Module & object)
overridevirtual

Processes the module object and initializes format fields.

Reimplemented from Linker::OutputFormat.

◆ WriteFile()

void ResourceFork::GenericResource::WriteFile ( Linker::Writer & out)
overridevirtual

Stores data in memory to file.

Implements Linker::Format.


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