Oberon || Library || Module Index || Search Engine || Definition || Module
TYPE Stream = POINTER TO StreamRec; TYPE StreamRec = RECORD (Streams.StreamRec) END;
PROCEDURE Open(VAR s: Streams.Stream); PROCEDURE AddMap(s: Streams.Stream; begin, end, offset: Streams.Count; to: Streams.Stream); PROCEDURE Valid(s: Streams.Stream; address: Streams.Count) : BOOLEAN;
Open initializes the given stream. As long no maps have been added all read or write operations will fail.
AddMap adds the interval to the set of legal address ranges. An access to a byte inside of this interval is translated by Maps to an access of the stream to at offset + current position - begin. If multiple maps have been added, they are considered in the invocation order of AddMap. Maps differentiates between read and write accesses, i.e. a read-only and a write-only stream may cover the same address range.
Valid returns TRUE if address is a valid address to read from.
Oberon || Library || Module Index || Search Engine || Definition || Module