<> <> <> <> DIRECTORY Convert, Rope, CHOpsP2V3, AuthenticationP14V2Aux, CHOpsP2V3Aux, CHNameP2V0Aux; CHOpsP2V3AuxImpl: CEDAR PROGRAM IMPORTS Convert, Rope, AuthenticationP14V2Aux, CHNameP2V0Aux EXPORTS CHOpsP2V3Aux ~ { OPEN CHOpsP2V3, CHOpsP2V3Aux; ROPE: TYPE ~ Rope.ROPE; ExposeObjectNameSequence: PUBLIC PROC [arg: ObjectNameSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, CHNameP2V0Aux.ExposeThreePartName[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeWhichArgument: PUBLIC PROC [arg: WhichArgument, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM first => res _ "first"; second => res _ "second"; ENDCASE => ERROR }; ExposeStreamOfThreePartName: PUBLIC PROC [arg: StreamOfThreePartName, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfThreePartName(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfThreePartNameObject.nextSegment => { res _ Rope.Concat[res, ExposeThreePartNameList[it.nextSegment, (level+1)]] }; it: REF StreamOfThreePartNameObject.lastSegment => { res _ Rope.Concat[res, ExposeThreePartNameSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeStreamOfDomain: PUBLIC PROC [arg: StreamOfDomain, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfDomain(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfDomainObject.nextSegment => { res _ Rope.Concat[res, ExposeDomainList[it.nextSegment, (level+1)]] }; it: REF StreamOfDomainObject.lastSegment => { res _ Rope.Concat[res, ExposeDomainSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeDomainNameSequence: PUBLIC PROC [arg: DomainNameSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, CHNameP2V0Aux.ExposeTwoPartName[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeStreamOfOrganization: PUBLIC PROC [arg: StreamOfOrganization, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfOrganization(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfOrganizationObject.nextSegment => { res _ Rope.Concat[res, ExposeOrganizationList[it.nextSegment, (level+1)]] }; it: REF StreamOfOrganizationObject.lastSegment => { res _ Rope.Concat[res, ExposeOrganizationSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeStreamOfDomainName: PUBLIC PROC [arg: StreamOfDomainName, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfDomainName(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfDomainNameObject.nextSegment => { res _ Rope.Concat[res, ExposeDomainNameList[it.nextSegment, (level+1)]] }; it: REF StreamOfDomainNameObject.lastSegment => { res _ Rope.Concat[res, ExposeDomainNameSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeArgumentProblem: PUBLIC PROC [arg: ArgumentProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM illegalProperty => res _ "illegalProperty"; illegalOrganizationName => res _ "illegalOrganizationName"; illegalDomainName => res _ "illegalDomainName"; illegalObjectName => res _ "illegalObjectName"; noSuchOrganization => res _ "noSuchOrganization"; noSuchDomain => res _ "noSuchDomain"; noSuchObject => res _ "noSuchObject"; ENDCASE => ERROR }; ExposeDomainList: PUBLIC PROC [arg: DomainList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeDomainSequence[arg.segment, (level+1)], "]"]; }; ExposeDomainSequence: PUBLIC PROC [arg: DomainSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, arg.body[i]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeThreePartNameSequence: PUBLIC PROC [arg: ThreePartNameSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, CHNameP2V0Aux.ExposeThreePartName[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeObjectNameList: PUBLIC PROC [arg: ObjectNameList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeObjectNameSequence[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 }; ExposeNetworkNumber: PUBLIC PROC [arg: NetworkNumber, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..2) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeHostNumber: PUBLIC PROC [arg: HostNumber, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..3) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeNetworkAddress: PUBLIC PROC [arg: NetworkAddress, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "network~", ExposeNetworkNumber[arg.network, (level+1)], ", "]; res _ Rope.Cat[res, "host~", ExposeHostNumber[arg.host, (level+1)], ", "]; res _ Rope.Cat[res, "socket~", Convert.RopeFromCard[arg.socket], "]"]; }; ExposeCallProblem: PUBLIC PROC [arg: CallProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM accessRightsInsufficient => res _ "accessRightsInsufficient"; tooBusy => res _ "tooBusy"; serverDown => res _ "serverDown"; useCourier => res _ "useCourier"; other => res _ "other"; ENDCASE => ERROR }; ExposeAuthenticator: PUBLIC PROC [arg: Authenticator, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "credentials~", AuthenticationP14V2Aux.ExposeCredentials[arg.credentials, (level+1)], ", "]; res _ Rope.Cat[res, "verifier~", AuthenticationP14V2Aux.ExposeSeqWords[arg.verifier, (level+1)], "]"]; }; ExposeDomainNameList: PUBLIC PROC [arg: DomainNameList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeDomainNameSequence[arg.segment, (level+1)], "]"]; }; ExposeNetworkAddressList: PUBLIC PROC [arg: NetworkAddressList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeNetworkAddress[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeStreamOfObject: PUBLIC PROC [arg: StreamOfObject, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfObject(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfObjectObject.nextSegment => { res _ Rope.Concat[res, ExposeObjectList[it.nextSegment, (level+1)]] }; it: REF StreamOfObjectObject.lastSegment => { res _ Rope.Concat[res, ExposeObjectSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeItem: PUBLIC PROC [arg: Item, 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, "]"]; }; ExposeOrganizationList: PUBLIC PROC [arg: OrganizationList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeOrganizationSequence[arg.segment, (level+1)], "]"]; }; ExposeOrganizationSequence: PUBLIC PROC [arg: OrganizationSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, arg.body[i]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeThreePartNameList: PUBLIC PROC [arg: ThreePartNameList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeThreePartNameSequence[arg.segment, (level+1)], "]"]; }; ExposeStreamOfObjectName: PUBLIC PROC [arg: StreamOfObjectName, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfObjectName(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfObjectNameObject.nextSegment => { res _ Rope.Concat[res, ExposeObjectNameList[it.nextSegment, (level+1)]] }; it: REF StreamOfObjectNameObject.lastSegment => { res _ Rope.Concat[res, ExposeObjectNameSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeObjectList: PUBLIC PROC [arg: ObjectList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeObjectSequence[arg.segment, (level+1)], "]"]; }; ExposeProperties: PUBLIC PROC [arg: Properties, 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, "]"]; }; ExposePropertyProblem: PUBLIC PROC [arg: PropertyProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM missing => res _ "missing"; wrongType => res _ "wrongType"; ENDCASE => ERROR }; ExposeUpdateProblem: PUBLIC PROC [arg: UpdateProblem, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM noChange => res _ "noChange"; outOfDate => res _ "outOfDate"; objectOverflow => res _ "objectOverflow"; databaseOverflow => res _ "databaseOverflow"; ENDCASE => ERROR }; ExposeObjectSequence: PUBLIC PROC [arg: ObjectSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, arg.body[i]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; }...