[Overview][Resource strings][Constants][Types][Classes][Index] Reference for unit 'resource' (#fcl-res)

TAbstractResourceReader

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base abstract resource reader class

Declaration

Source position: resource.pp line 283

type TAbstractResourceReader = class

protected

  procedure SetDataSize();

  

Protected method to let a reader set a resource DataSize property

  procedure SetHeaderSize();

  

Protected method to let a reader set a resource HeaderSize property

  procedure SetDataOffset();

  

Protected method to let a reader set a resource DataOffset property

  procedure SetRawData();

  

Protected method to let a reader set a resource RawData property

  procedure CallSubReaderLoad();

  

Calls another reader's Load method

  procedure AddNoTree();

  

Adds a resource without updating the internal tree

  function GetTree();

  

Gets the internal resource tree of a TResources object

  function GetExtensions; virtual; abstract;

  

Returns the extensions the reader is registered for

  function GetDescription; virtual; abstract;

  

Returns the description of the reader

  procedure Load(); virtual; abstract;

  

Loads resources from a stream

  function CheckMagic(); virtual; abstract;

  

Checks whether a stream is in a format the reader recognizes

public

  constructor Create; virtual; abstract;

  

Creates a new reader object

  property Extensions: string; [r]

  

The extensions of file types the reader is able to read

  property Description: string; [r]

  

The reader description

end;

Inheritance

TAbstractResourceReader

  

Base abstract resource reader class

|

TObject

Description

This is the base class that represents a resource reader.

A resource reader is an object whose job is to populate a TResources object with resources read from a stream in a specific format.

Typically, a TResources object invokes CheckMagic method of the resource reader when it's searching for a reader able to read a certain stream, and Load method when it wants the reader to read data from the stream.

Usually each resource reader registers itself with TResources class in the initialization section of the unit in which it is implemented: this way a TResources object can find it when probing a stream that is to be read.

Remark: An object of this class should never be directly instantiated: use a descendant class instead.

See also

TResources

  

A collection of resources

TAbstractResource

  

Base abstract resource class

TAbstractResourceWriter

  

Base abstract resource writer class

TResResourceReader

  

.res resource reader

TCoffResourceReader

  

COFF resource reader

TWinPEResourceReader

  

PE image file resource reader

TElfResourceReader

  

ELF resource reader

TExternalResourceReader

  

External file resource reader

TDfmResourceReader

  

DFM resource reader


Documentation generated on: Sep 28 2017