TYPE TResourceFile = OBJECT (TObject) Stream : PStream; { File as a stream } Modified: Boolean; { Modified flag } Constructor Init (AStream: PStream); Destructor Done; Virtual; Function Count: Sw_Integer; Function KeyAt (I: Sw_Integer): String; Function Get (Key: String): PObject; Function SwitchTo (AStream: PStream; Pack: Boolean): PStream; Procedure Flush; Procedure Delete (Key: String); Procedure Put (Item: PObject; Key: String); END; PResourceFile = ^TResourceFile; |
TResourceFile has the following fields:
Init will try to position the stream on the start of the resources section, and read all resources from the stream.
If Pack is true, then all the known resources will be copied from the current stream to the new stream (AStream). If Pack is False, then only the current resource is copied.
The return value is the value of the original stream: Stream.
The Modified flag is set as a consequence of this call.