Sign in Join
FPDoc Onlineexperiment

TAbstractResourceReader class

In unit resource

Base abstract resource reader class

Declaration

pascal
TAbstractResourceReader = class

Descends from it: TCoffResourceReader TDfmResourceReader TElfResourceReader TExternalResourceReader TMachOResourceReader TResResourceReader TWinPEImageResourceReader

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.

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

See also

Properties

ExtensionspublicThe extensions of file types the reader is able to read
DescriptionpublicThe reader description

Methods

SetDataSizeprotectedProtected method to let a reader set a resource DataSize property
SetHeaderSizeprotectedProtected method to let a reader set a resource HeaderSize property
SetDataOffsetprotectedProtected method to let a reader set a resource DataOffset property
SetRawDataprotectedProtected method to let a reader set a resource RawData property
CallSubReaderLoadprotectedCalls another reader's Load method
AddNoTreeprotectedAdds a resource without updating the internal tree
GetTreeprotectedGets the internal resource tree of a TResources object
GetExtensionsprotectedReturns the extensions the reader is registered for
GetDescriptionprotectedReturns the description of the reader
LoadprotectedLoads resources from a stream
CheckMagicprotectedChecks whether a stream is in a format the reader recognizes
CreatepublicCreates a new reader object

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.