Loads resources from a stream
Source position: resource.pp line 303
protected procedure TAbstractResourceReader.Load( |
aResources: TResources; |
aStream: TStream |
); virtual; abstract; |
aResources |
|
The TResources object to be loaded from the stream |
aStream |
|
The stream which resources must be loaded from |
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:
Set at least the following resource properties:
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.
|
A collection of resources |
|
|
Loads the contents of the object from a stream |
|
|
Loads the contents of the object from a file |
|
|
Base abstract resource class |
|
|
The size of resource raw data |
|
|
The offset of resource data from the beginning of the stream |
|
|
The raw resource data stream |
|
|
Protected method to let a reader set a resource DataSize property |
|
|
Protected method to let a reader set a resource DataOffset property |
|
|
Protected method to let a reader set a resource RawData property |
|
|
Checks whether a stream is in a format the reader recognizes |
|
|
Stream class that provides copy-on-write functionality |