Sign in Join
FPDoc Onlineexperiment

TAbstractResourceReader.Load procedure

Member of TAbstractResourceReaderprotectedIn unit resource

Loads resources from a stream

Declaration

pascal
procedure Load(aResources: TResources; aStream: TStream); virtual
 ; abstract

Arguments

aResources

The TResources object to be loaded from the stream

aStream

The stream which resources must be loaded from

Description

A TResources object invokes this method when it needs to be loaded from a stream, passing itself as the aResources parameter and the stream as the aStream parameter.

aStream position is already correctly set: the reader must start to read from there.

Descendant classes must ensure that the the stream is in a format they recognize, otherwise an EResourceReaderWrongFormatException exception must be raised.

Each resource is then created, read from the stream and added to the TResources object.

When reading a resource, a reader must:

Errors

If the stream is in a format not recognized by the reader, a EResourceReaderWrongFormatException exception must be raised.

If the stream ends prematurely, a EResourceReaderUnexpectedEndOfStreamException exception must be raised.

See also

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