DIRECTORY Core USING [CellType], SymTab USING [Ref], Rope USING [ROPE]; CoreDirectory: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; CellType: TYPE = Core.CellType; Library: TYPE = SymTab.Ref; RegisterLibrary: PROC [library: Library, name: ROPE] RETURNS [sameLibrary: Library]; ForgetLibrary: PROC [name: ROPE]; FetchLibrary: PROC [name: ROPE] RETURNS [library: Library _ NIL]; LibraryNotFound: SIGNAL [name: ROPE]; CreateLibrary: PROC [] RETURNS [library: Library]; Insert: PROC [library: Library, key: ROPE, ct: CellType, overWrite: BOOL _ FALSE] RETURNS [first: BOOL]; Fetch: PROC [library: REF, key: ROPE] RETURNS [ct: CellType _ NIL]; END. †CoreDirectory.mesa Copyright Σ 1986, 1987 by Xerox Corporation. All rights reversed. Created by Christian Jacobi, July 14, 1986 9:50:03 am PDT Last Edited by: Jacobi July 15, 1986 9:33:25 am PDT Mike Spreitzer February 27, 1987 2:34:46 pm PST Bertrand Serlet, June 4, 1987 12:40:09 pm PDT Purpose Defines libraries of Core CellTypes, as well as a global name space for named libraries. No relation between the names of CellTypes in a library and the real name of the CellType is enforced by this package. Types A Library associates a name (ROPE, case matters) to a Core CellType. Access by primitives Registers library in the global name space. Forgets previous registrations of name. Procedure returns same library again for convenience. Forgets named library. Does not change actual library [but the library can be garbage collected] Fetches a library from the global name space. Returns NIL if not found. Access with sugared version Creates a new, empty library. Inserts new key-CellType pair into library. overWrite: may overwrite previous association in library Returns first: key was not defined in library before. May raise LibraryNotFound, resume is ok, and in that case no action is taken. Looks up key in library, returns associated CellType (if any). Returns NIL if CellType not found. library: Union of Library & ROPE May raise libraryNotFound, resume is ok, and in that case returns NIL. Κ3˜codešœ™KšœB™BKšœ6Οk™9Kšœ0™3Kšœ,™/Kšœ-™-—K™š ˜ Kšœœ ˜Kšœœ˜Kšœœœ˜—K˜KšΟn œœ œ˜(head™Ibody™XM™x—šΟb™Kšœœœ˜šœ œ˜K˜—šœ œ˜Jšœœ#™D——šœ™šžœœœœ˜TK™,K™'Kšœ5™5K˜—šž œœœ˜!Kšœ™KšœI™IK™—š ž œœœœœ˜AJ™-Jšœœ™——šœ™šžœœœ˜%J˜—šž œœœ˜2K™K™—šžœœœœœœ œ˜hJšœ+™+Kšœ8™8Kšœ5™5KšœM™MK˜—š žœœ œœœœ˜CKšœ>™>Kšœœ™"Kšœ™ KšœBœ™F—K˜—Kšœ˜K˜J˜J˜—…—” M