class ObjFieldList

pri next : ObjFieldList;

pri Field : ObjFieldInfo;

meth SetNext =^ (val n: ObjFieldList

next:= n;

)

end

meth GetNext =^ (res n: ObjFieldList

n:= next;

)

end

meth GetField =^ (res f: ObjFieldInfo

f:= Field;

)

end

meth SetField =^ (val f: ObjFieldInfo

Field:= f;

)

end

% Getting a data field from the object

meth GetDataFd =^ ( val N: String;

res D: Object

 

var Fd : ObjFieldInfo

var name : String

var next : ObjFieldList

 

self.GetName(name);

If [] Name = N

ObjFd.GetField(Fd);

Fd.GetData(D);

[] Name <> N

self.Getnext(next);

GetDataFd(N,D);

Fi

end end end

)

end

% Uppdating a data field in the object

meth PutDataFd =^ ( vres Tail:ObjFieldList;

val N: String;

val D: Object

var next : ObjFieldList

var Fd : ObjFieldInfo

var name : String

Tail.GetField(Fd);

Fd.GetName(name);

if [] Name = N

Fd.SetData(D);

Tail.SetField(Fd);

[] Name <> N

Tail.GetNext(next);

Next.PutDataFd(Next, N, D);

Tail.PutNext(Next);

fi

end end end

)

end

 

end