UTGetPutImpl.mesa
Please do not edit this file.
It was generated using CedarRPCGen.
DIRECTORY
Rope,
SunRPC,
UT,
UTGetPut;
UTGetPutImpl: CEDAR PROGRAM
IMPORTS SunRPC EXPORTS UT, UTGetPut =
BEGIN
Handle: TYPE = SunRPC.Handle;
ROPE: TYPE = Rope.ROPE;
ReturnCodesNames: PUBLIC ARRAY UT.ReturnCodes OF ROPE ← [
"iluSuccess",
"iluECantExportService",
"ENotAuthorized",
"ENotApplicable"
];
GetReturnCodes: PUBLIC PROC[h: Handle] RETURNS [res: UT.ReturnCodes] = {
res ← VAL[SunRPC.GetInt32[h]];
};
PutReturnCodes: PUBLIC PROC[h: Handle, in: UT.ReturnCodes] = {
SunRPC.PutInt32[h, ORD[in]];
};
GetBindingInfo: PUBLIC PROC[h: Handle] RETURNS [res: UT.BindingInfo] = {
res ← SunRPC.GetRope[h];
};
PutBindingInfo: PUBLIC PROC[h: Handle, in: UT.BindingInfo] = {
SunRPC.PutRope[h, in];
};
GetOPAQUE: PUBLIC PROC[h: Handle] RETURNS [res: UT.OPAQUE] = {
res ← SunRPC.GetRefText[h];
};
PutOPAQUE: PUBLIC PROC[h: Handle, in: UT.OPAQUE] = {
SunRPC.PutRefText[h, in];
};
GetObjectType: PUBLIC PROC[h: Handle] RETURNS [res: UT.ObjectType] = {
res ← SunRPC.GetRope[h];
};
PutObjectType: PUBLIC PROC[h: Handle, in: UT.ObjectType] = {
SunRPC.PutRope[h, in];
};
GetString: PUBLIC PROC[h: Handle] RETURNS [res: UT.String] = {
res ← SunRPC.GetRope[h];
};
PutString: PUBLIC PROC[h: Handle, in: UT.String] = {
SunRPC.PutRope[h, in];
};
GetObjectTypeSet: PUBLIC PROC[h: Handle] RETURNS [res: UT.ObjectTypeSet] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[UT.SeqType0Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetString[h];
ENDLOOP;
};
};
PutObjectTypeSet: PUBLIC PROC[h: Handle, in: UT.ObjectTypeSet] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutString[h, in[i]];
ENDLOOP;
};
GetDotCons: PUBLIC PROC[h: Handle] RETURNS [res: UT.DotCons] = {
res.key ← SunRPC.GetRope[h];
res.value ← SunRPC.GetRope[h];
};
PutDotCons: PUBLIC PROC[h: Handle, in: UT.DotCons] = {
SunRPC.PutRope[h, in.key];
SunRPC.PutRope[h, in.value];
};
GetObjectDescription: PUBLIC PROC[h: Handle] RETURNS [res: UT.ObjectDescription] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[UT.SeqType1Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetDotCons[h];
ENDLOOP;
};
};
PutObjectDescription: PUBLIC PROC[h: Handle, in: UT.ObjectDescription] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutDotCons[h, in[i]];
ENDLOOP;
};
GetObjectId: PUBLIC PROC[h: Handle] RETURNS [res: UT.ObjectId] = {
res.objectType ← SunRPC.GetRope[h];
res.objectUid ← GetOPAQUE[h];
};
PutObjectId: PUBLIC PROC[h: Handle, in: UT.ObjectId] = {
SunRPC.PutRope[h, in.objectType];
PutOPAQUE[h, in.objectUid];
};
GetObjct: PUBLIC PROC[h: Handle] RETURNS [res: UT.Objct] = {
res.binding ← SunRPC.GetRope[h];
res.rock ← GetOPAQUE[h];
res.description ← GetObjectDescription[h];
};
PutObjct: PUBLIC PROC[h: Handle, in: UT.Objct] = {
SunRPC.PutRope[h, in.binding];
PutOPAQUE[h, in.rock];
PutObjectDescription[h, in.description];
};
GetObjectSet: PUBLIC PROC[h: Handle] RETURNS [res: UT.ObjectSet] = {
{
len: INT ← SunRPC.GetInt32[h];
res ← NEW[UT.SeqType2Object[len]];
FOR i: INT IN [0..len) DO
res[i] ← GetObjct[h];
ENDLOOP;
};
};
PutObjectSet: PUBLIC PROC[h: Handle, in: UT.ObjectSet] = {
SunRPC.PutInt32[h, in.size];
FOR i: INT IN [0..in.size) DO
PutObjct[h, in[i]];
ENDLOOP;
};
END.