LBGetPutImpl.mesa
Please do not edit this file.
It was generated using CedarRPCGen.
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",
"NotDescendantLoc",
"NotCompositeLoc"
];
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]];
};
GetSimple: PUBLIC PROC[h: Handle] RETURNS [res: LB.Simple] = {
res ← SunRPC.GetRope[h];
};
PutSimple: PUBLIC PROC[h: Handle, in: LB.Simple] = {
SunRPC.PutRope[h, in];
};
GetString: PUBLIC PROC[h: Handle] RETURNS [res: LB.String] = {
res ← SunRPC.GetRope[h];
};
PutString: PUBLIC PROC[h: Handle, in: LB.String] = {
SunRPC.PutRope[h, in];
};
GetT: PUBLIC PROC[h: Handle] RETURNS [res: LB.T] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[LB.SeqType2Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetString[h];
ENDLOOP;
};
};
PutT: PUBLIC PROC[h: Handle, in: LB.T] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutString[h, in[i]];
ENDLOOP;
};
GetSet: PUBLIC PROC[h: Handle] RETURNS [res: LB.Set] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[LB.SeqType3Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetT[h];
ENDLOOP;
};
};
PutSet: PUBLIC PROC[h: Handle, in: LB.Set] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutT[h, in[i]];
ENDLOOP;
};
GetAtomic: PUBLIC PROC[h: Handle] RETURNS [res: LB.Atomic] = {
res ← SunRPC.GetRope[h];
};
PutAtomic: PUBLIC PROC[h: Handle, in: LB.Atomic] = {
SunRPC.PutRope[h, in];
};
GetDistance: PUBLIC PROC[h: Handle] RETURNS [res: LB.Distance] = {
res ← SunRPC.GetDReal[h];
};
PutDistance: PUBLIC PROC[h: Handle, in: LB.Distance] = {
SunRPC.PutDReal[h, in];
};
GetStep: PUBLIC PROC[h: Handle] RETURNS [res: LB.Step] = {
res.d ← GetDistance[h];
res.to ← SunRPC.GetRope[h];
};
PutStep: PUBLIC PROC[h: Handle, in: LB.Step] = {
PutDistance[h, in.d];
SunRPC.PutRope[h, in.to];
};
GetStepSeq: PUBLIC PROC[h: Handle] RETURNS [res: LB.StepSeq] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[LB.SeqType4Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetStep[h];
ENDLOOP;
};
};
PutStepSeq: PUBLIC PROC[h: Handle, in: LB.StepSeq] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutStep[h, in[i]];
ENDLOOP;
};
GetPath: PUBLIC PROC[h: Handle] RETURNS [res: LB.Path] = {
res.frm ← SunRPC.GetRope[h];
res.d ← GetDistance[h];
res.steps ← GetStepSeq[h];
};
PutPath: PUBLIC PROC[h: Handle, in: LB.Path] = {
SunRPC.PutRope[h, in.frm];
PutDistance[h, in.d];
PutStepSeq[h, in.steps];
};
GetPathSet: PUBLIC PROC[h: Handle] RETURNS [res: LB.PathSet] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[LB.SeqType5Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetPath[h];
ENDLOOP;
};
};
PutPathSet: PUBLIC PROC[h: Handle, in: LB.PathSet] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutPath[h, in[i]];
ENDLOOP;
};
GetPathSolution: PUBLIC PROC[h: Handle] RETURNS [res: LB.PathSolution] = {
res.dmin ← GetDistance[h];
res.dmax ← GetDistance[h];
res.ps ← GetPathSet[h];
};
PutPathSolution: PUBLIC PROC[h: Handle, in: LB.PathSolution] = {
PutDistance[h, in.dmin];
PutDistance[h, in.dmax];
PutPathSet[h, in.ps];
};
GetNearest: PUBLIC PROC[h: Handle] RETURNS [res: LB.Nearest] = {
res.to ← GetT[h];
res.paths ← GetPathSolution[h];
};
PutNearest: PUBLIC PROC[h: Handle, in: LB.Nearest] = {
PutT[h, in.to];
PutPathSolution[h, in.paths];
};
GetNearests: PUBLIC PROC[h: Handle] RETURNS [res: LB.Nearests] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[LB.SeqType6Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetNearest[h];
ENDLOOP;
};
};
PutNearests: PUBLIC PROC[h: Handle, in: LB.Nearests] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutNearest[h, in[i]];
ENDLOOP;
};
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;
};
GetParentargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.Parentargs] = {
res.l ← SunRPC.GetRope[h];
};
PutParentargs: PUBLIC PROC[h: Handle, in: LB.Parentargs] = {
SunRPC.PutRope[h, in.l];
};
GetParentreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.Parentreturn] = {
tag: LB.ReturnCodes;
tag ← GetReturnCodes[h];
SELECT tag FROM
EError => {
v: REF EError LB.ParentreturnObject ← NEW[EError LB.ParentreturnObject];
v.EErrorValue ← GetErrorType[h];
res ← v;
};
iluSuccess => {
v: REF iluSuccess LB.ParentreturnObject ← NEW[iluSuccess LB.ParentreturnObject];
v.returnValue ← SunRPC.GetRope[h];
res ← v;
};
ENDCASE => NULL;
};
PutParentreturn: PUBLIC PROC[h: Handle, in: LB.Parentreturn] = {
PutReturnCodes[h, in.returnCode];
SELECT in.returnCode FROM
EError => {
v: REF EError LB.ParentreturnObject ← NARROW[in];
PutErrorType[h, v.EErrorValue];
};
iluSuccess => {
v: REF iluSuccess LB.ParentreturnObject ← NARROW[in];
SunRPC.PutRope[h, v.returnValue];
};
ENDCASE => NULL;
};
GetChildrenargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.Childrenargs] = {
res.l ← SunRPC.GetRope[h];
};
PutChildrenargs: PUBLIC PROC[h: Handle, in: LB.Childrenargs] = {
SunRPC.PutRope[h, in.l];
};
GetChildrenreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.Childrenreturn] = {
tag: LB.ReturnCodes;
tag ← GetReturnCodes[h];
SELECT tag FROM
EError => {
v: REF EError LB.ChildrenreturnObject ← NEW[EError LB.ChildrenreturnObject];
v.EErrorValue ← GetErrorType[h];
res ← v;
};
iluSuccess => {
v: REF iluSuccess LB.ChildrenreturnObject ← NEW[iluSuccess LB.ChildrenreturnObject];
v.returnValue ← GetSet[h];
res ← v;
};
ENDCASE => NULL;
};
PutChildrenreturn: PUBLIC PROC[h: Handle, in: LB.Childrenreturn] = {
PutReturnCodes[h, in.returnCode];
SELECT in.returnCode FROM
EError => {
v: REF EError LB.ChildrenreturnObject ← NARROW[in];
PutErrorType[h, v.EErrorValue];
};
iluSuccess => {
v: REF iluSuccess LB.ChildrenreturnObject ← NARROW[in];
PutSet[h, v.returnValue];
};
ENDCASE => NULL;
};
GetShortestPathsargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.ShortestPathsargs] = {
res.frm ← GetT[h];
res.to ← GetT[h];
res.wantPaths ← SunRPC.GetCard32[h];
};
PutShortestPathsargs: PUBLIC PROC[h: Handle, in: LB.ShortestPathsargs] = {
PutT[h, in.frm];
PutT[h, in.to];
SunRPC.PutCard32[h, in.wantPaths];
};
GetShortestPathsreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.ShortestPathsreturn] = {
tag: LB.ReturnCodes;
tag ← GetReturnCodes[h];
SELECT tag FROM
EError => {
v: REF EError LB.ShortestPathsreturnObject ← NEW[EError LB.ShortestPathsreturnObject];
v.EErrorValue ← GetErrorType[h];
res ← v;
};
iluSuccess => {
v: REF iluSuccess LB.ShortestPathsreturnObject ← NEW[iluSuccess LB.ShortestPathsreturnObject];
v.returnValue ← GetPathSolution[h];
res ← v;
};
ENDCASE => NULL;
};
PutShortestPathsreturn: PUBLIC PROC[h: Handle, in: LB.ShortestPathsreturn] = {
PutReturnCodes[h, in.returnCode];
SELECT in.returnCode FROM
EError => {
v: REF EError LB.ShortestPathsreturnObject ← NARROW[in];
PutErrorType[h, v.EErrorValue];
};
iluSuccess => {
v: REF iluSuccess LB.ShortestPathsreturnObject ← NARROW[in];
PutPathSolution[h, v.returnValue];
};
ENDCASE => NULL;
};
GetFindNearestsargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.FindNearestsargs] = {
res.frm ← GetT[h];
res.to ← GetSet[h];
res.wantPaths ← SunRPC.GetCard32[h];
};
PutFindNearestsargs: PUBLIC PROC[h: Handle, in: LB.FindNearestsargs] = {
PutT[h, in.frm];
PutSet[h, in.to];
SunRPC.PutCard32[h, in.wantPaths];
};
GetFindNearestsreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.FindNearestsreturn] = {
tag: LB.ReturnCodes;
tag ← GetReturnCodes[h];
SELECT tag FROM
EError => {
v: REF EError LB.FindNearestsreturnObject ← NEW[EError LB.FindNearestsreturnObject];
v.EErrorValue ← GetErrorType[h];
res ← v;
};
iluSuccess => {
v: REF iluSuccess LB.FindNearestsreturnObject ← NEW[iluSuccess LB.FindNearestsreturnObject];
v.returnValue ← GetNearests[h];
res ← v;
};
ENDCASE => NULL;
};
PutFindNearestsreturn: PUBLIC PROC[h: Handle, in: LB.FindNearestsreturn] = {
PutReturnCodes[h, in.returnCode];
SELECT in.returnCode FROM
EError => {
v: REF EError LB.FindNearestsreturnObject ← NARROW[in];
PutErrorType[h, v.EErrorValue];
};
iluSuccess => {
v: REF iluSuccess LB.FindNearestsreturnObject ← NARROW[in];
PutNearests[h, v.returnValue];
};
ENDCASE => NULL;
};
GetFindNearestsOfKindargs: PUBLIC PROC[h: Handle] RETURNS [res: LB.FindNearestsOfKindargs] = {
res.frm ← GetT[h];
res.kind ← SunRPC.GetRope[h];
res.description ← UTGetPut.GetObjectDescription[h];
res.wantPaths ← SunRPC.GetCard32[h];
};
PutFindNearestsOfKindargs: PUBLIC PROC[h: Handle, in: LB.FindNearestsOfKindargs] = {
PutT[h, in.frm];
SunRPC.PutRope[h, in.kind];
UTGetPut.PutObjectDescription[h, in.description];
SunRPC.PutCard32[h, in.wantPaths];
};
GetFindNearestsOfKindreturn: PUBLIC PROC[h: Handle] RETURNS [res: LB.FindNearestsOfKindreturn] = {
tag: LB.ReturnCodes;
tag ← GetReturnCodes[h];
SELECT tag FROM
EError => {
v: REF EError LB.FindNearestsOfKindreturnObject ← NEW[EError LB.FindNearestsOfKindreturnObject];
v.EErrorValue ← GetErrorType[h];
res ← v;
};
iluSuccess => {
v: REF iluSuccess LB.FindNearestsOfKindreturnObject ← NEW[iluSuccess LB.FindNearestsOfKindreturnObject];
v.returnValue ← GetNearests[h];
res ← v;
};
ENDCASE => NULL;
};
PutFindNearestsOfKindreturn: PUBLIC PROC[h: Handle, in: LB.FindNearestsOfKindreturn] = {
PutReturnCodes[h, in.returnCode];
SELECT in.returnCode FROM
EError => {
v: REF EError LB.FindNearestsOfKindreturnObject ← NARROW[in];
PutErrorType[h, v.EErrorValue];
};
iluSuccess => {
v: REF iluSuccess LB.FindNearestsOfKindreturnObject ← NARROW[in];
PutNearests[h, v.returnValue];
};
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.