DIRECTORY Rope, SunRPC, UT, UTGetPut, LB, LBGetPut; LBGetPutImpl: CEDAR PROGRAM IMPORTS SunRPC, UTGetPut EXPORTS LB, LBGetPut = BEGIN Handle: TYPE = SunRPC.Handle; ROPE: TYPE = Rope.ROPE; ReturnCodesNames: PUBLIC ARRAY LB.ReturnCodes OF ROPE _ [ "iluSuccess", "iluECantExportService", "EError" ]; GetReturnCodes: PUBLIC PROC[h: Handle] RETURNS [res: LB.ReturnCodes] = { res _ VAL[SunRPC.GetInt32[h]]; }; PutReturnCodes: PUBLIC PROC[h: Handle, in: LB.ReturnCodes] = { SunRPC.PutInt32[h, ORD[in]]; }; GetLocRoom: PUBLIC PROC[h: Handle] RETURNS [res: LB.LocRoom] = { res _ SunRPC.GetRope[h]; }; PutLocRoom: PUBLIC PROC[h: Handle, in: LB.LocRoom] = { SunRPC.PutRope[h, in]; }; GetLocXYZ: PUBLIC PROC[h: Handle] RETURNS [res: LB.LocXYZ] = { res.x _ SunRPC.GetDReal[h]; res.y _ SunRPC.GetDReal[h]; res.z _ SunRPC.GetDReal[h]; }; PutLocXYZ: PUBLIC PROC[h: Handle, in: LB.LocXYZ] = { SunRPC.PutDReal[h, in.x]; SunRPC.PutDReal[h, in.y]; SunRPC.PutDReal[h, in.z]; }; LocationDescriminationValuesNames: PUBLIC ARRAY LB.LocationDescriminationValues OF ROPE _ [ "LocationVLocRoom", "LocationVLocXYZ" ]; GetLocationDescriminationValues: PUBLIC PROC[h: Handle] RETURNS [res: LB.LocationDescriminationValues] = { res _ VAL[SunRPC.GetInt32[h]]; }; PutLocationDescriminationValues: PUBLIC PROC[h: Handle, in: LB.LocationDescriminationValues] = { SunRPC.PutInt32[h, ORD[in]]; }; GetLocation: PUBLIC PROC[h: Handle] RETURNS [res: LB.Location] = { tag: LB.LocationDescriminationValues; tag _ GetLocationDescriminationValues[h]; SELECT tag FROM LocationVLocRoom => { v: REF LocationVLocRoom LB.LocationObject _ NEW[LocationVLocRoom LB.LocationObject]; v.vLocRoom _ SunRPC.GetRope[h]; res _ v; }; LocationVLocXYZ => { v: REF LocationVLocXYZ LB.LocationObject _ NEW[LocationVLocXYZ LB.LocationObject]; v.vLocXYZ _ GetLocXYZ[h]; res _ v; }; ENDCASE => NULL; }; PutLocation: PUBLIC PROC[h: Handle, in: LB.Location] = { PutLocationDescriminationValues[h, in.descriminator]; SELECT in.descriminator FROM LocationVLocRoom => { v: REF LocationVLocRoom LB.LocationObject _ NARROW[in]; SunRPC.PutRope[h, v.vLocRoom]; }; LocationVLocXYZ => { v: REF LocationVLocXYZ LB.LocationObject _ NARROW[in]; PutLocXYZ[h, v.vLocXYZ]; }; ENDCASE => NULL; }; GetSphere: PUBLIC PROC[h: Handle] RETURNS [res: LB.Sphere] = { res.center _ GetLocXYZ[h]; res.radius _ SunRPC.GetDReal[h]; }; PutSphere: PUBLIC PROC[h: Handle, in: LB.Sphere] = { PutLocXYZ[h, in.center]; SunRPC.PutDReal[h, in.radius]; }; BasicVolumeDescriminationValuesNames: PUBLIC ARRAY LB.BasicVolumeDescriminationValues OF ROPE _ [ "BasicVolumeVLocRoom", "BasicVolumeVSphere" ]; GetBasicVolumeDescriminationValues: PUBLIC PROC[h: Handle] RETURNS [res: LB.BasicVolumeDescriminationValues] = { res _ VAL[SunRPC.GetInt32[h]]; }; PutBasicVolumeDescriminationValues: PUBLIC PROC[h: Handle, in: LB.BasicVolumeDescriminationValues] = { SunRPC.PutInt32[h, ORD[in]]; }; GetBasicVolume: PUBLIC PROC[h: Handle] RETURNS [res: LB.BasicVolume] = { tag: LB.BasicVolumeDescriminationValues; tag _ GetBasicVolumeDescriminationValues[h]; SELECT tag FROM BasicVolumeVLocRoom => { v: REF BasicVolumeVLocRoom LB.BasicVolumeObject _ NEW[BasicVolumeVLocRoom LB.BasicVolumeObject]; v.vLocRoom _ SunRPC.GetRope[h]; res _ v; }; BasicVolumeVSphere => { v: REF BasicVolumeVSphere LB.BasicVolumeObject _ NEW[BasicVolumeVSphere LB.BasicVolumeObject]; v.vSphere _ GetSphere[h]; res _ v; }; ENDCASE => NULL; }; PutBasicVolume: PUBLIC PROC[h: Handle, in: LB.BasicVolume] = { PutBasicVolumeDescriminationValues[h, in.descriminator]; SELECT in.descriminator FROM BasicVolumeVLocRoom => { v: REF BasicVolumeVLocRoom LB.BasicVolumeObject _ NARROW[in]; SunRPC.PutRope[h, v.vLocRoom]; }; BasicVolumeVSphere => { v: REF BasicVolumeVSphere LB.BasicVolumeObject _ NARROW[in]; PutSphere[h, v.vSphere]; }; ENDCASE => NULL; }; GetVolume: PUBLIC PROC[h: Handle] RETURNS [res: LB.Volume] = { { len: INT _ SunRPC.GetInt32[h]; res _ NEW[LB.SeqType0Object[len]]; FOR i: INT IN [0..len) DO res[i] _ GetBasicVolume[h]; ENDLOOP; }; }; PutVolume: PUBLIC PROC[h: Handle, in: LB.Volume] = { SunRPC.PutInt32[h, in.size]; FOR i: INT IN [0..in.size) DO PutBasicVolume[h, in[i]]; ENDLOOP; }; GetLocatedObject: PUBLIC PROC[h: Handle] RETURNS [res: LB.LocatedObject] = { res.o _ UTGetPut.GetObjct[h]; res.l _ GetLocation[h]; }; PutLocatedObject: PUBLIC PROC[h: Handle, in: LB.LocatedObject] = { UTGetPut.PutObjct[h, in.o]; PutLocation[h, in.l]; }; GetLocatedObjectSet: PUBLIC PROC[h: Handle] RETURNS [res: LB.LocatedObjectSet] = { { len: INT _ SunRPC.GetInt32[h]; res _ NEW[LB.SeqType1Object[len]]; FOR i: INT IN [0..len) DO res[i] _ GetLocatedObject[h]; ENDLOOP; }; }; PutLocatedObjectSet: PUBLIC PROC[h: Handle, in: LB.LocatedObjectSet] = { SunRPC.PutInt32[h, in.size]; FOR i: INT IN [0..in.size) DO PutLocatedObject[h, in[i]]; ENDLOOP; }; ChangeOperationNames: PUBLIC ARRAY LB.ChangeOperation OF ROPE _ [ "Add", "Delete" ]; GetChangeOperation: PUBLIC PROC[h: Handle] RETURNS [res: LB.ChangeOperation] = { res _ VAL[SunRPC.GetInt32[h]]; }; PutChangeOperation: PUBLIC PROC[h: Handle, in: LB.ChangeOperation] = { SunRPC.PutInt32[h, ORD[in]]; }; ErrorTypeNames: PUBLIC ARRAY LB.ErrorType OF ROPE _ [ "BadLoc", "BadObject", "BadCallback", "BadRoom", "BadRock" ]; GetErrorType: PUBLIC PROC[h: Handle] RETURNS [res: LB.ErrorType] = { res _ VAL[SunRPC.GetInt32[h]]; }; PutErrorType: PUBLIC PROC[h: Handle, in: LB.ErrorType] = { SunRPC.PutInt32[h, ORD[in]]; }; GetAtLocargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.AtLocargs] = { res.o _ UTGetPut.GetObjct[h]; res.loc _ GetLocation[h]; }; PutAtLocargs: PUBLIC PROC[h: Handle, in: LB.AtLocargs] = { UTGetPut.PutObjct[h, in.o]; PutLocation[h, in.loc]; }; GetAtLocreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.AtLocreturn] = { tag: LB.ReturnCodes; tag _ GetReturnCodes[h]; SELECT tag FROM EError => { v: REF EError LB.AtLocreturnObject _ NEW[EError LB.AtLocreturnObject]; v.EErrorValue _ GetErrorType[h]; res _ v; }; iluSuccess => { v: REF iluSuccess LB.AtLocreturnObject _ NEW[iluSuccess LB.AtLocreturnObject]; res _ v; }; ENDCASE => NULL; }; PutAtLocreturn: PUBLIC PROC[h: Handle, in: LB.AtLocreturn] = { PutReturnCodes[h, in.returnCode]; SELECT in.returnCode FROM EError => { v: REF EError LB.AtLocreturnObject _ NARROW[in]; PutErrorType[h, v.EErrorValue]; }; iluSuccess => { v: REF iluSuccess LB.AtLocreturnObject _ NARROW[in]; }; ENDCASE => NULL; }; GetRemoveObjectargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.RemoveObjectargs] = { res.o _ UTGetPut.GetObjct[h]; }; PutRemoveObjectargs: PUBLIC PROC[h: Handle, in: LB.RemoveObjectargs] = { UTGetPut.PutObjct[h, in.o]; }; GetRemoveObjectreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.RemoveObjectreturn] = { tag: LB.ReturnCodes; tag _ GetReturnCodes[h]; SELECT tag FROM EError => { v: REF EError LB.RemoveObjectreturnObject _ NEW[EError LB.RemoveObjectreturnObject]; v.EErrorValue _ GetErrorType[h]; res _ v; }; iluSuccess => { v: REF iluSuccess LB.RemoveObjectreturnObject _ NEW[iluSuccess LB.RemoveObjectreturnObject]; v.returnValue _ SunRPC.GetCard32[h]; res _ v; }; ENDCASE => NULL; }; PutRemoveObjectreturn: PUBLIC PROC[h: Handle, in: LB.RemoveObjectreturn] = { PutReturnCodes[h, in.returnCode]; SELECT in.returnCode FROM EError => { v: REF EError LB.RemoveObjectreturnObject _ NARROW[in]; PutErrorType[h, v.EErrorValue]; }; iluSuccess => { v: REF iluSuccess LB.RemoveObjectreturnObject _ NARROW[in]; SunRPC.PutCard32[h, v.returnValue]; }; ENDCASE => NULL; }; GetFindObjectsargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.FindObjectsargs] = { res.locs _ GetVolume[h]; res.types _ UTGetPut.GetObjectTypeSet[h]; }; PutFindObjectsargs: PUBLIC PROC[h: Handle, in: LB.FindObjectsargs] = { PutVolume[h, in.locs]; UTGetPut.PutObjectTypeSet[h, in.types]; }; GetFindObjectsreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.FindObjectsreturn] = { tag: LB.ReturnCodes; tag _ GetReturnCodes[h]; SELECT tag FROM EError => { v: REF EError LB.FindObjectsreturnObject _ NEW[EError LB.FindObjectsreturnObject]; v.EErrorValue _ GetErrorType[h]; res _ v; }; iluSuccess => { v: REF iluSuccess LB.FindObjectsreturnObject _ NEW[iluSuccess LB.FindObjectsreturnObject]; v.returnValue _ GetLocatedObjectSet[h]; res _ v; }; ENDCASE => NULL; }; PutFindObjectsreturn: PUBLIC PROC[h: Handle, in: LB.FindObjectsreturn] = { PutReturnCodes[h, in.returnCode]; SELECT in.returnCode FROM EError => { v: REF EError LB.FindObjectsreturnObject _ NARROW[in]; PutErrorType[h, v.EErrorValue]; }; iluSuccess => { v: REF iluSuccess LB.FindObjectsreturnObject _ NARROW[in]; PutLocatedObjectSet[h, v.returnValue]; }; ENDCASE => NULL; }; GetNotifyOfObjectsargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.NotifyOfObjectsargs] = { res.locs _ GetVolume[h]; res.types _ UTGetPut.GetObjectTypeSet[h]; res.who _ SunRPC.GetRope[h]; res.rock _ UTGetPut.GetOPAQUE[h]; }; PutNotifyOfObjectsargs: PUBLIC PROC[h: Handle, in: LB.NotifyOfObjectsargs] = { PutVolume[h, in.locs]; UTGetPut.PutObjectTypeSet[h, in.types]; SunRPC.PutRope[h, in.who]; UTGetPut.PutOPAQUE[h, in.rock]; }; GetNotifyOfObjectsreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.NotifyOfObjectsreturn] = { tag: LB.ReturnCodes; tag _ GetReturnCodes[h]; SELECT tag FROM EError => { v: REF EError LB.NotifyOfObjectsreturnObject _ NEW[EError LB.NotifyOfObjectsreturnObject]; v.EErrorValue _ GetErrorType[h]; res _ v; }; iluSuccess => { v: REF iluSuccess LB.NotifyOfObjectsreturnObject _ NEW[iluSuccess LB.NotifyOfObjectsreturnObject]; res _ v; }; ENDCASE => NULL; }; PutNotifyOfObjectsreturn: PUBLIC PROC[h: Handle, in: LB.NotifyOfObjectsreturn] = { PutReturnCodes[h, in.returnCode]; SELECT in.returnCode FROM EError => { v: REF EError LB.NotifyOfObjectsreturnObject _ NARROW[in]; PutErrorType[h, v.EErrorValue]; }; iluSuccess => { v: REF iluSuccess LB.NotifyOfObjectsreturnObject _ NARROW[in]; }; ENDCASE => NULL; }; GetRemoveObjectCallbackargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.RemoveObjectCallbackargs] = { res.who _ SunRPC.GetRope[h]; res.rock _ UTGetPut.GetOPAQUE[h]; }; PutRemoveObjectCallbackargs: PUBLIC PROC[h: Handle, in: LB.RemoveObjectCallbackargs] = { SunRPC.PutRope[h, in.who]; UTGetPut.PutOPAQUE[h, in.rock]; }; GetRemoveObjectCallbackreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.RemoveObjectCallbackreturn] = { tag: LB.ReturnCodes; tag _ GetReturnCodes[h]; SELECT tag FROM EError => { v: REF EError LB.RemoveObjectCallbackreturnObject _ NEW[EError LB.RemoveObjectCallbackreturnObject]; v.EErrorValue _ GetErrorType[h]; res _ v; }; iluSuccess => { v: REF iluSuccess LB.RemoveObjectCallbackreturnObject _ NEW[iluSuccess LB.RemoveObjectCallbackreturnObject]; res _ v; }; ENDCASE => NULL; }; PutRemoveObjectCallbackreturn: PUBLIC PROC[h: Handle, in: LB.RemoveObjectCallbackreturn] = { PutReturnCodes[h, in.returnCode]; SELECT in.returnCode FROM EError => { v: REF EError LB.RemoveObjectCallbackreturnObject _ NARROW[in]; PutErrorType[h, v.EErrorValue]; }; iluSuccess => { v: REF iluSuccess LB.RemoveObjectCallbackreturnObject _ NARROW[in]; }; ENDCASE => NULL; }; GetNotifyObjectsCallbackargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.NotifyObjectsCallbackargs] = { res.rock _ UTGetPut.GetOPAQUE[h]; res.os _ GetLocatedObjectSet[h]; res.change _ GetChangeOperation[h]; }; PutNotifyObjectsCallbackargs: PUBLIC PROC[h: Handle, in: LB.NotifyObjectsCallbackargs] = { UTGetPut.PutOPAQUE[h, in.rock]; PutLocatedObjectSet[h, in.os]; PutChangeOperation[h, in.change]; }; GetNotifyObjectsCallbackreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.NotifyObjectsCallbackreturn] = { tag: LB.ReturnCodes; tag _ GetReturnCodes[h]; SELECT tag FROM EError => { v: REF EError LB.NotifyObjectsCallbackreturnObject _ NEW[EError LB.NotifyObjectsCallbackreturnObject]; v.EErrorValue _ GetErrorType[h]; res _ v; }; iluSuccess => { v: REF iluSuccess LB.NotifyObjectsCallbackreturnObject _ NEW[iluSuccess LB.NotifyObjectsCallbackreturnObject]; res _ v; }; ENDCASE => NULL; }; PutNotifyObjectsCallbackreturn: PUBLIC PROC[h: Handle, in: LB.NotifyObjectsCallbackreturn] = { PutReturnCodes[h, in.returnCode]; SELECT in.returnCode FROM EError => { v: REF EError LB.NotifyObjectsCallbackreturnObject _ NARROW[in]; PutErrorType[h, v.EErrorValue]; }; iluSuccess => { v: REF iluSuccess LB.NotifyObjectsCallbackreturnObject _ NARROW[in]; }; ENDCASE => NULL; }; END. \ LBGetPutImpl.mesa Please do not edit this file. It was generated using CedarRPCGen. Ê9•NewlineDelimiter ™J™J™J™#J˜šÏk ˜ J˜J˜Jšœ˜J˜ Jšœ˜J˜ J˜—šÏn œœ˜Jšœœœ ˜0—Jš˜Jšœœ˜J˜Jšœœœ˜J˜š žœœœœ œœ˜9J˜ J˜J˜J˜J˜—š žœœœ œœ˜HJšœœ˜J˜J˜—šžœœœœ˜>Jšœœ˜J˜J˜—š ž œœœ œœ ˜@J˜J˜J˜—šž œœœœ ˜6J˜J˜J˜—š ž œœœ œœ ˜>J˜J˜J˜J˜J˜—šž œœœœ ˜4J˜J˜J˜J˜J˜—š ž!œœœœœœ˜[J˜J˜J˜J˜—š žœœœ œœ"˜jJšœœ˜J˜J˜—šžœœœœ"˜`Jšœœ˜J˜J˜—š ž œœœ œœ˜BJšœœ˜%J˜)šœ˜˜Jš œœœœœ˜TJ˜J˜J˜—˜Jš œœœœœ˜RJ˜J˜J˜—Jšœœ˜—J˜J˜—šž œœœœ˜8J˜5šœ˜˜Jšœœœœ˜7J˜J˜—˜Jšœœœœ˜6J˜J˜—Jšœœ˜—J˜J˜—š ž œœœ œœ ˜>J˜J˜ J˜J˜—šž œœœœ ˜4J˜J˜J˜J˜—š ž$œœœœ!œœ˜aJ˜J˜J˜J˜—š ž"œœœ œœ%˜pJšœœ˜J˜J˜—šž"œœœœ%˜fJšœœ˜J˜J˜—š žœœœ œœ˜HJšœœ!˜(J˜,šœ˜˜Jš œœœœœ˜`J˜J˜J˜—˜Jš œœœœœ˜^J˜J˜J˜—Jšœœ˜—J˜J˜—šžœœœœ˜>J˜8šœ˜˜Jšœœœœ˜=J˜J˜—˜Jšœœœœ˜J˜Jšœœ˜Jšœœœ˜"šœœœ ˜J˜Jšœ˜—J˜J˜J˜—šž œœœœ ˜4J˜šœœœ˜J˜Jšœ˜—J˜J˜—š žœœœ œœ˜LJ˜J˜J˜J˜—šžœœœœ˜BJ˜J˜J˜J˜—š žœœœ œœ˜RJ˜Jšœœ˜Jšœœœ˜"šœœœ ˜J˜Jšœ˜—J˜J˜J˜—šžœœœœ˜HJ˜šœœœ˜J˜Jšœ˜—J˜J˜—š žœœœœœœ˜AJ˜J˜J˜J˜—š žœœœ œœ˜PJšœœ˜J˜J˜—šžœœœœ˜FJšœœ˜J˜J˜—š žœœœœ œœ˜5J˜ J˜ J˜J˜ J˜ J˜J˜—š ž œœœ œœ˜DJšœœ˜J˜J˜—šž œœœœ˜:Jšœœ˜J˜J˜—š ž œœœ œœ˜DJ˜J˜J˜J˜—šž œœœœ˜:J˜J˜J˜J˜—š žœœœ œœ˜HJšœœ ˜J˜šœ˜˜ Jš œœœœœ˜FJ˜ J˜J˜—˜Jš œœ œœ œ˜NJ˜J˜—Jšœœ˜—J˜J˜—šžœœœœ˜>J˜!šœ˜˜ Jšœœœœ˜0J˜J˜—˜Jšœœ œœ˜4J˜—Jšœœ˜—J˜J˜—š žœœœ œœ˜RJ˜J˜J˜—šžœœœœ˜HJ˜J˜J˜—š žœœœ œœ˜VJšœœ ˜J˜šœ˜˜ Jš œœœœœ˜TJ˜ J˜J˜—˜Jš œœ œœ œ˜\J˜$J˜J˜—Jšœœ˜—J˜J˜—šžœœœœ˜LJ˜!šœ˜˜ Jšœœœœ˜7J˜J˜—˜Jšœœ œœ˜;J˜#J˜—Jšœœ˜—J˜J˜—š žœœœ œœ˜PJ˜J˜)J˜J˜—šžœœœœ˜FJ˜J˜'J˜J˜—š žœœœ œœ˜TJšœœ ˜J˜šœ˜˜ Jš œœœœœ˜RJ˜ J˜J˜—˜Jš œœ œœ œ˜ZJ˜'J˜J˜—Jšœœ˜—J˜J˜—šžœœœœ˜JJ˜!šœ˜˜ Jšœœœœ˜6J˜J˜—˜Jšœœ œœ˜:J˜&J˜—Jšœœ˜—J˜J˜—š žœœœ œœ˜XJ˜J˜)J˜J˜!J˜J˜—šžœœœœ˜NJ˜J˜'J˜J˜J˜J˜—š žœœœ œœ˜\Jšœœ ˜J˜šœ˜˜ Jš œœœœœ˜ZJ˜ J˜J˜—˜Jš œœ œœ œ˜bJ˜J˜—Jšœœ˜—J˜J˜—šžœœœœ˜RJ˜!šœ˜˜ Jšœœœœ˜:J˜J˜—˜Jšœœ œœ˜>J˜—Jšœœ˜—J˜J˜—š žœœœ œœ˜bJ˜J˜!J˜J˜—šžœœœœ˜XJ˜J˜J˜J˜—š žœœœ œœ ˜fJšœœ ˜J˜šœ˜˜ Jš œœœ$œœ#˜dJ˜ J˜J˜—˜Jš œœ œ$œ œ#˜lJ˜J˜—Jšœœ˜—J˜J˜—šžœœœœ ˜\J˜!šœ˜˜ Jšœœœ$œ˜?J˜J˜—˜Jšœœ œ$œ˜CJ˜—Jšœœ˜—J˜J˜—š žœœœ œœ˜dJ˜!J˜ J˜#J˜J˜—šžœœœœ˜ZJ˜J˜J˜!J˜J˜—š žœœœ œœ!˜hJšœœ ˜J˜šœ˜˜ Jš œœœ%œœ$˜fJ˜ J˜J˜—˜Jš œœ œ%œ œ$˜nJ˜J˜—Jšœœ˜—J˜J˜—šžœœœœ!˜^J˜!šœ˜˜ Jšœœœ%œ˜@J˜J˜—˜Jšœœ œ%œ˜DJ˜—Jšœœ˜—J˜J˜—Jšœ˜—…—/æ?{