-- Fugleman.mesa
-- Last changed by Doug Wyatt, September 6, 1980 11:34 AM
Fugleman: DEFINITIONS = {
Handle: TYPE = LONG POINTER TO Object;
New: PROC[foo: INTEGER] RETURNS[Handle];
Mumble: PROC[self: Handle] = INLINE {
self.procs.Mumble[self]
};
Copy: PROC[self: Handle] RETURNS[Handle] = INLINE {
RETURN[self.procs.Copy[self]]
};
Free: PROC[selfPtr: LONG POINTER TO Handle] = INLINE {
IF selfPtr↑#NIL THEN selfPtr↑.procs.Free[selfPtr]
};
Object: PRIVATE TYPE = RECORD [
procs: LONG POINTER TO READONLY Procs,
data: LONG POINTER TO Data
];
Procs: PRIVATE TYPE = RECORD [
Mumble: PROC[self: Handle],
Copy: PROC[self: Handle] RETURNS[Handle],
Free: PROC[selfPtr: LONG POINTER TO Handle]
];
Data: PRIVATE TYPE;
FuglemanImpl: PROGRAM;
}.