<<>> <> <> <> <> <<>> <> <> <<>> DIRECTORY IO USING [STREAM], Rope USING [ROPE]; SerializedFiling: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; Error: ERROR [reason: ATOM, exp: ROPE]; <> SerializedFile: TYPE ~ RECORD [ version: CARD32, file: SerializedTree ]; currentVersion: CARD32 ~ 3; SerializedTree: TYPE ~ RECORD [ attributes: AttributeSequence, content: SerializedContentBytes, children: SerializedTreeSequence ]; AttributeSequence: TYPE ~ REF AttributeSequenceObject; AttributeSequenceObject: TYPE ~ MACHINE DEPENDENT RECORD [ body: PACKED SEQUENCE length: CARDINAL OF Attribute ]; Attribute: TYPE ~ RECORD [ type: AttributeType, value: AttributeValue ]; AttributeType: TYPE ~ CARD32; AttributeValue: TYPE ~ REF AttributeValueObject; AttributeValueObject: TYPE ~ SegmentObject; SerializedContentBytes: TYPE ~ RECORD [ data: StreamOfUnspecified, lastByteIsSignificant: BOOLEAN ]; StreamOfUnspecified: TYPE ~ LIST OF Segment; Segment: TYPE ~ REF SegmentObject; SegmentObject: TYPE ~ MACHINE DEPENDENT RECORD [ body: PACKED SEQUENCE length: CARDINAL OF CARD16 ]; SerializedTreeSequence: TYPE ~ REF SerializedTreeSequenceObject; SerializedTreeSequenceObject: TYPE ~ MACHINE DEPENDENT RECORD [ body: PACKED SEQUENCE length: CARDINAL OF SerializedTree ]; <> GetSerializedFile: PROC [s: STREAM] RETURNS [sfout: SerializedFile]; <> <<>> PutSerializedFile: PROC [s: STREAM, sfin: SerializedFile]; <> <<>> <> GetRopeContents: PROC [sf: SerializedFile] RETURNS [contents: ROPE]; <> <<>> SetRopeContents: PROC [sf: SerializedFile, contents: ROPE] RETURNS [new: SerializedFile]; <> <<>> GetAttributeAsRope: PROC [sf: SerializedFile, type: AttributeType] RETURNS [value: ROPE]; <> <<>> SetAttributeFromRope: PROC [sf: SerializedFile, type: AttributeType, value: ROPE] RETURNS [new: SerializedFile]; <> <<>> GetRopeAttribute: PROC [sf: SerializedFile, type: AttributeType] RETURNS [value: ROPE]; <> <<>> SetRopeAttribute: PROC [sf: SerializedFile, type: AttributeType, value: ROPE] RETURNS [new: SerializedFile]; <> <> <<>> GetVersionedRopeAttribute: PROC [sf: SerializedFile, type: AttributeType] RETURNS [version: CARD16, value: ROPE]; <> <<>> SetVersionedRopeAttribute: PROC [sf: SerializedFile, type: AttributeType, version: CARD16, value: ROPE] RETURNS [new: SerializedFile]; <> <> <<>> RopeFromSegment: PROC [segment: Segment, lastByteIsSignificant: BOOLEAN ¬ TRUE] RETURNS [rope: ROPE]; <> <<>> SegmentFromRope: PROC [rope: ROPE] RETURNS [segment: Segment, lastByteIsSignificant: BOOLEAN]; <> <<>> <<>> END.