SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
Note: This module is a reduced version of the `Storage' module from the old abandoned ADT library effort. All references to `alien' objects have been removed, otherwise the functionality is unchanged.
Syntax of externalized objects:
file = {object}. object = NUM(ref) [ objdescr ]. objdescr = type data {object data}. type = NUM(tref) [ module_name type_name ]. module_name = {char} 0X. type_name = {char} 0X.
`ref' is a unique reference number assigned to an object when it is externalized. The first occurrence of a reference number is followed by the object's qualified type name, and the object's value. `tref' is a type reference number; it is allocated in a similar way.
`data' is a sequence of bytes (possibly empty), produced by calling Storable.Object.Store on a object. The sequence does not contain any embedded objects, but it does contain NIL pointers.
ADT:Storable IO Object Object
Class List | |
Reader | A reader for serialized object data. |
Writer | A writer of serialized object data. |
Class Summary: Reader [Detail] | |
+---IO:BinaryRider.Reader | +---ADT:Storable.Reader | +--ADT:Object:Storage.Reader A reader for serialized object data. | |
Inherited Fields | |
Constructor Summary | |
ConnectReader(ByteChannel): Reader Creates a new reader instance operating on channel ch. | |
Method Summary | |
Disconnect() Disconnects reader r, and cleans up the internal data structures. | |
INIT(ByteChannel) Initializes a new reader instance r for channel ch. | |
ReadObject(VAR Object) Reads an object reference from the channel underlying the reader r. | |
Inherited Methods | |
From IO:BinaryRider.Reader: From ADT:Storable.Reader: |
Class Summary: Writer [Detail] | |
+---IO:BinaryRider.Writer | +---ADT:Storable.Writer | +--ADT:Object:Storage.Writer A writer of serialized object data. | |
Inherited Fields | |
Constructor Summary | |
ConnectWriter(ByteChannel): Writer Creates a new writer instance operating on channel ch. | |
Method Summary | |
Disconnect() Completes the data written to the channel of writer w, and cleans up the internal data structures. | |
INIT(ByteChannel) Initializes a new writer instance w for channel ch. | |
WriteObject(Object) Writes object to the channel underlying the writer w. | |
Inherited Methods | |
From IO:BinaryRider.Writer: From ADT:Storable.Writer: |
Type Summary | |
[CharBuffer] = ARRAY n OF CHAR | |
[ObjectArray] = POINTER TO ARRAY OF Object | |
[TypeArray] = POINTER TO ARRAY OF RECORD ... END | |
[TypeRefMap] = POINTER TO ARRAY OF RECORD ... END |
Class Detail: Reader |
Constructor Detail |
PROCEDURE ConnectReader(ch: ByteChannel): Reader
Creates a new reader instance operating on channel ch.
Method Detail |
PROCEDURE (r: Reader) Disconnect()
Disconnects reader r, and cleans up the internal data structures. Any resources allocated by the reader are freed.
[Description inherited from Disconnect]
Redefines: Disconnect
PROCEDURE (r: Reader) INIT(ch: ByteChannel)
Initializes a new reader instance r for channel ch. Little endian byte ordering is used by the reader.
[Description inherited from INIT]
PROCEDURE (r: Reader) ReadObject(VAR obj: Object) RAISES Error;
Reads an object reference from the channel underlying the reader r. The object obj itself is required to provide the necessary type-bound procedure Object.Load to restore its own data from r.
[Description inherited from ReadObject]
Redefines: ReadObject
Class Detail: Writer |
Constructor Detail |
PROCEDURE ConnectWriter(ch: ByteChannel): Writer
Creates a new writer instance operating on channel ch.
Method Detail |
PROCEDURE (w: Writer) Disconnect()
Completes the data written to the channel of writer w, and cleans up the internal data structures. Without calling Writer.Disconnect the externalized objects may be left in a invalid state, and no new externalization process can be started. After Writer.Disconnect, all operations on w are undefined.
[Description inherited from Disconnect]
Redefines: Disconnect
PROCEDURE (w: Writer) INIT(ch: ByteChannel)
Initializes a new writer instance w for channel ch. Little endian byte ordering is used by the writer.
[Description inherited from INIT]
PROCEDURE (w: Writer) WriteObject(obj: Object) RAISES Error;
Writes object to the channel underlying the writer w. The externalization framework is provided by the concrete instance of writer w. The object itself is required to provide the necessary type-bound procedure Object.Store to pass its own data to w.
Pre-condition: obj is NIL, or it is an instance of Object.
[Description inherited from WriteObject]
Redefines: WriteObject
Type Detail |
TYPE [CharBuffer] = ARRAY n OF CHAR
TYPE [ObjectArray] = POINTER TO ARRAY OF Object
TYPE [TypeArray] = POINTER TO ARRAY OF RECORD YYYYEND
TYPE [TypeRefMap] = POINTER TO ARRAY OF RECORD YYYYEND