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; LibraryNotFound: SIGNAL [name: ROPE]; RegisterLibrary: PROC [library: Library, name: ROPE] RETURNS [sameLibrary: Library]; ForgetLibrary: PROC [name: ROPE]; FetchLibrary: PROC [name: ROPE] RETURNS [library: Library]; 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, March 28, 1987 11:11:03 pm PST 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. Global name space of libraries 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. May raise LibraryNotFound, resume is ok, and in that case returns NIL. Short cuts 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. Κ˜codešœ™KšœB™BKšœ9™9K™3K™/K™/—K™šΟk ˜ Kšœœ ˜Kšœœ˜Kšœœœ˜—K˜KšΠbn œœ œ˜(head™Ibody™XM™x—šΟb™Kšœœœ˜šœ œ˜K˜—šœ œ˜JšœD™DJ™—Jšœœœ˜&—šΟn™š œœœœ˜TK™,K™'Kšœ5™5K˜—š  œœœ˜!Kšœ™KšœI™IK™—š  œœœœ˜;J™-JšœF™F——š  ™ š  œœœ˜2K™K™—š œœœœœœ œ˜hJšœ+™+Kšœ8™8Kšœ5™5KšœM™MK˜—š  œœ œœœœ˜CKšœ>™>Kšœ"™"Kšœ™ KšœF™F—K˜—Kšœ˜K˜J˜J˜—…—Ž L