Skip to content

TAbstractResourceWriter.Write

Writes resources to a stream

Declaration

Source position: resource.pp line 319

protected 
procedure TAbstractResourceWriter.Write(aResources: TResources; 
                                       aStream: TStream);  virtual
                                       ;  abstract;

Description

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

aStream position is already correctly set: the writer must start to write from there.

A writer must write data in the way specified by the format it supports: usually this means writing a header and all resources contained in the TResources object.

For each resource, a writer should write some information about the resource (like type and name) in a way defined by the format it implements, and the resource data, which is accessible by RawData property of the resource.

See also

Name Description
TResources A collection of resources
TResources.WriteToStream Writes the contents of the object to a stream
TResources.WriteToFile Writes the contents of the object to a file
TAbstractResource Base abstract resource class
TAbstractResource.DataSize The size of resource raw data
TAbstractResource.RawData The raw resource data stream