MobConnection.mesa
Copyright Ó 1991 by Xerox Corporation. All rights reserved.
Created by Michael Plass, May 3, 1989
Michael Plass, June 23, 1989 2:21:59 pm PDT
This interface provides simple client access to mob files, presenting information similar to that provided by the mob lister (XLister), but in a form more amenable to programs. It does not claim to provide comprehensive access to mobs, but the interface is intended to be general enough that this would be possible.
DIRECTORY Rope;
MobConnection: CEDAR DEFINITIONS
~ BEGIN
FormIdentifier: TYPE = ATOM;
ModuleID: TYPE = RECORD [
identifier: ATOM, -- e.g, $MobConnection
version: ATOM -- e.g, $v953774e4263ada3c
];
FilterItem: TYPE = {versions, directory, using, imports, importedItems, exports, typeExports, exportedItems, modules, configurations, spare0, spare1, spare2, spare3};
FalseBool: TYPE = BOOL ¬ FALSE;
Filter: TYPE = PACKED ARRAY FilterItem OF FalseBool;
Error: ERROR [culprit: REF, msg: Rope.ROPE];
DecodeMob: PROC [
fileName: Rope.ROPE,
begin: PROC [FormIdentifier], -- start a substructure
end: PROC, -- terminate a substructure
putATOM: PROC[ATOM],
putROPE: PROC[Rope.ROPE],
putINT: PROC[INT],
putBOOL: PROC[BOOL],
putModuleID: PROC[ModuleID],
filter: Filter ¬ ALL[TRUE]
];
LORAFromMob: PROC [fileName: Rope.ROPE, filter: Filter ¬ ALL[TRUE]] RETURNS [LIST OF REF ANY]; -- look at this impl for a sample client.
END.