FilingAttributesP10V5AuxImpl.Mesa
Copyright (C) 1986 by Xerox Corporation. All rights reserved.
Generated by Diebert.pa at May 10, 1988 10:44:06 am PDT
using Sirocco [2.0] of January 31, 1987 1:52:42 am PST
DIRECTORY
Convert,
Rope,
FilingAttributesP10V5,
CHNameP2V0Aux,
FilingAttributesP10V5Aux;
FilingAttributesP10V5AuxImpl: CEDAR PROGRAM
IMPORTS Convert, Rope, CHNameP2V0Aux
EXPORTS FilingAttributesP10V5Aux ~ {
OPEN FilingAttributesP10V5, FilingAttributesP10V5Aux;
ROPE: TYPE ~ Rope.ROPE;
ExposeSerializedFile: PUBLIC PROC [arg: SerializedFile, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "version~", Convert.RopeFromCard[arg.version], ", "];
res ← Rope.Cat[res, "file~", ExposeSerializedTree[arg.file, (level+1)], "]"];
};
ExposeAttributeValue: PUBLIC PROC [arg: AttributeValue, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAccessList: PUBLIC PROC [arg: AccessList, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "entries~", ExposeAccessEntrySequence[arg.entries, (level+1)], ", "];
res ← Rope.Cat[res, "defaulted~", Convert.RopeFromBool[arg.defaulted], "]"];
};
ExposeStreamOfUnspecified: PUBLIC PROC [arg: StreamOfUnspecified, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAttribute: PUBLIC PROC [arg: Attribute, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "type~", Convert.RopeFromCard[arg.type], ", "];
res ← Rope.Cat[res, "value~", ExposeAttributeValue[arg.value, (level+1)], "]"];
};
ExposeOrdering: PUBLIC PROC [arg: Ordering, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "key~", Convert.RopeFromCard[arg.key], ", "];
res ← Rope.Cat[res, "ascending~", Convert.RopeFromBool[arg.ascending], ", "];
res ← Rope.Cat[res, "interpretation~", ExposeInterpretation[arg.interpretation, (level+1)], "]"];
};
ExposeWellKnownType: PUBLIC PROC [arg: WellKnownType, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
tUnspecified => res ← "tUnspecified";
tDirectory => res ← "tDirectory";
tText => res ← "tText";
tSerialized => res ← "tSerialized";
tEmpty => res ← "tEmpty";
tAscii => res ← "tAscii";
tAsciiText => res ← "tAsciiText";
ENDCASE => ERROR
};
ExposeAccessEntry: PUBLIC PROC [arg: AccessEntry, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "key~", CHNameP2V0Aux.ExposeThreePartName[arg.key, (level+1)], ", "];
res ← Rope.Cat[res, "access~", ExposeAccessSequence[arg.access, (level+1)], "]"];
};
ExposeStreamOfAttributeSequence: PUBLIC PROC [arg: StreamOfAttributeSequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← Rope.Cat["StreamOfAttributeSequence(", ExposeStreamKind[arg.type, (level+1)], "): "];
WITH arg SELECT FROM
it: REF StreamOfAttributeSequenceObject.nextSegment => {
res ← Rope.Concat[res, ExposeAttributeSequenceList[it.nextSegment, (level+1)]] };
it: REF StreamOfAttributeSequenceObject.lastSegment => {
res ← Rope.Concat[res, ExposeAttributeSequenceSequence[it.lastSegment, (level+1)]] };
ENDCASE => ERROR
};
ExposeSerializedTree: PUBLIC PROC [arg: SerializedTree, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "attributes~", ExposeAttributeSequence[arg.attributes, (level+1)], ", "];
res ← Rope.Cat[res, "content~", ExposeSerializedContentBytes[arg.content, (level+1)], "]"];
};
ExposeInterpretation: PUBLIC PROC [arg: Interpretation, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
interpretationNone => res ← "interpretationNone";
boolean => res ← "boolean";
cardinal => res ← "cardinal";
longCardinal => res ← "longCardinal";
time => res ← "time";
integer => res ← "integer";
longInteger => res ← "longInteger";
string => res ← "string";
ENDCASE => ERROR
};
ExposeAttributeSequence: PUBLIC PROC [arg: AttributeSequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAttribute[arg.body[i], (level+1)]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeBytePairSequence: PUBLIC PROC [arg: BytePairSequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAttributeSequenceSequence: PUBLIC PROC [arg: AttributeSequenceSequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAttributeSequence[arg.body[i], (level+1)]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAsciiString: PUBLIC PROC [arg: AsciiString, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "lastByteIsSignificant~", Convert.RopeFromBool[arg.lastByteIsSignificant], ", "];
res ← Rope.Cat[res, "data~", ExposeBytePairSequence[arg.data, (level+1)], "]"];
};
ExposeAttributeSequenceList: PUBLIC PROC [arg: AttributeSequenceList, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "segment~", ExposeAttributeSequenceSequence[arg.segment, (level+1)], "]"];
};
ExposeStreamKind: PUBLIC PROC [arg: StreamKind, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
nextSegment => res ← "nextSegment";
lastSegment => res ← "lastSegment";
ENDCASE => ERROR
};
ExposePosition: PUBLIC PROC [arg: Position, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeSerializedContentBytes: PUBLIC PROC [arg: SerializedContentBytes, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "data~", ExposeStreamOfUnspecified[arg.data, (level+1)], ", "];
res ← Rope.Cat[res, "lastByteIsSignificant~", Convert.RopeFromBool[arg.lastByteIsSignificant], "]"];
};
ExposeInterpretedAttributeType: PUBLIC PROC [arg: InterpretedAttributeType, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
checksum => res ← "checksum";
childrenUniquelyNamed => res ← "childrenUniquelyNamed";
createdBy => res ← "createdBy";
createdOn => res ← "createdOn";
fileID => res ← "fileID";
isDirectory => res ← "isDirectory";
isTemporary => res ← "isTemporary";
modifiedBy => res ← "modifiedBy";
modifiedOn => res ← "modifiedOn";
name => res ← "name";
numberOfChildren => res ← "numberOfChildren";
ordering => res ← "ordering";
parentID => res ← "parentID";
position => res ← "position";
readBy => res ← "readBy";
readOn => res ← "readOn";
dataSize => res ← "dataSize";
type => res ← "type";
version => res ← "version";
accessList => res ← "accessList";
defaultAccessList => res ← "defaultAccessList";
pathname => res ← "pathname";
unused22 => res ← "unused22";
unused23 => res ← "unused23";
unused24 => res ← "unused24";
unused25 => res ← "unused25";
storedSize => res ← "storedSize";
subtreeSize => res ← "subtreeSize";
subtreeSizeLimit => res ← "subtreeSizeLimit";
ENDCASE => ERROR
};
ExposeStreamOfAsciiText: PUBLIC PROC [arg: StreamOfAsciiText, level: NAT] RETURNS [res: ROPE] ~ {
res ← Rope.Cat["StreamOfAsciiText(", ExposeStringStreamKind[arg.type, (level+1)], "): "];
WITH arg SELECT FROM
it: REF StreamOfAsciiTextObject.nextLine => {
res ← Rope.Concat[res, ExposeAsciiStringList[it.nextLine, (level+1)]] };
it: REF StreamOfAsciiTextObject.lastLine => {
res ← Rope.Concat[res, ExposeAsciiString[it.lastLine, (level+1)]] };
ENDCASE => ERROR
};
ExposeSerializedTreeSequence: PUBLIC PROC [arg: SerializedTreeSequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeSerializedTree[arg.body[i], (level+1)]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeFileID: PUBLIC PROC [arg: FileID, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..5) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAsciiStringList: PUBLIC PROC [arg: AsciiStringList, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
res ← Rope.Cat[res, "line~", ExposeAsciiString[arg.line, (level+1)], "]"];
};
ExposeAccessEntrySequence: PUBLIC PROC [arg: AccessEntrySequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAccessEntry[arg.body[i], (level+1)]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAccessSequence: PUBLIC PROC [arg: AccessSequence, level: NAT] RETURNS [res: ROPE] ~ {
res ← "[";
FOR i: CARDINAL IN [0..arg.length) DO
res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAccessType[arg.body[i], (level+1)]];
ENDLOOP;
res ← Rope.Concat[res, "]"];
};
ExposeAccessType: PUBLIC PROC [arg: AccessType, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
read => res ← "read";
write => res ← "write";
owner => res ← "owner";
add => res ← "add";
remove => res ← "remove";
fullAccess => res ← "fullAccess";
ENDCASE => ERROR
};
ExposeStringStreamKind: PUBLIC PROC [arg: StringStreamKind, level: NAT] RETURNS [res: ROPE] ~ {
SELECT arg FROM
nextLine => res ← "nextLine";
lastLine => res ← "lastLine";
ENDCASE => ERROR
};
ExposeInterpretedAttribute: PUBLIC PROC [arg: InterpretedAttribute, level: NAT] RETURNS [res: ROPE] ~ {
res ← Rope.Cat["InterpretedAttribute(", ExposeInterpretedAttributeType[arg.type, (level+1)], "): "];
WITH arg SELECT FROM
it: REF InterpretedAttributeObject.checksum => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.checksum]] };
it: REF InterpretedAttributeObject.childrenUniquelyNamed => {
res ← Rope.Concat[res, Convert.RopeFromBool[it.childrenUniquelyNamed]] };
it: REF InterpretedAttributeObject.createdBy => {
res ← Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.createdBy, (level+1)]] };
it: REF InterpretedAttributeObject.createdOn => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.createdOn]] };
it: REF InterpretedAttributeObject.fileID => {
res ← Rope.Concat[res, ExposeFileID[it.fileID, (level+1)]] };
it: REF InterpretedAttributeObject.isDirectory => {
res ← Rope.Concat[res, Convert.RopeFromBool[it.isDirectory]] };
it: REF InterpretedAttributeObject.isTemporary => {
res ← Rope.Concat[res, Convert.RopeFromBool[it.isTemporary]] };
it: REF InterpretedAttributeObject.modifiedBy => {
res ← Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.modifiedBy, (level+1)]] };
it: REF InterpretedAttributeObject.modifiedOn => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.modifiedOn]] };
it: REF InterpretedAttributeObject.name => {
res ← Rope.Concat[res, it.name] };
it: REF InterpretedAttributeObject.numberOfChildren => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.numberOfChildren]] };
it: REF InterpretedAttributeObject.ordering => {
res ← Rope.Concat[res, ExposeOrdering[it.ordering, (level+1)]] };
it: REF InterpretedAttributeObject.parentID => {
res ← Rope.Concat[res, ExposeFileID[it.parentID, (level+1)]] };
it: REF InterpretedAttributeObject.position => {
res ← Rope.Concat[res, ExposePosition[it.position, (level+1)]] };
it: REF InterpretedAttributeObject.readBy => {
res ← Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.readBy, (level+1)]] };
it: REF InterpretedAttributeObject.readOn => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.readOn]] };
it: REF InterpretedAttributeObject.dataSize => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.dataSize]] };
it: REF InterpretedAttributeObject.type => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.type]] };
it: REF InterpretedAttributeObject.version => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.version]] };
it: REF InterpretedAttributeObject.accessList => {
res ← Rope.Concat[res, ExposeAccessList[it.accessList, (level+1)]] };
it: REF InterpretedAttributeObject.defaultAccessList => {
res ← Rope.Concat[res, ExposeAccessList[it.defaultAccessList, (level+1)]] };
it: REF InterpretedAttributeObject.pathname => {
res ← Rope.Concat[res, it.pathname] };
it: REF InterpretedAttributeObject.unused22 => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.unused22]] };
it: REF InterpretedAttributeObject.unused23 => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.unused23]] };
it: REF InterpretedAttributeObject.unused24 => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.unused24]] };
it: REF InterpretedAttributeObject.unused25 => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.unused25]] };
it: REF InterpretedAttributeObject.storedSize => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.storedSize]] };
it: REF InterpretedAttributeObject.subtreeSize => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.subtreeSize]] };
it: REF InterpretedAttributeObject.subtreeSizeLimit => {
res ← Rope.Concat[res, Convert.RopeFromCard[it.subtreeSizeLimit]] };
ENDCASE => ERROR
};
}...