DIRECTORY CD, Rope, SymTab; CDGenerate: CEDAR DEFINITIONS = BEGIN Table: TYPE = REF READONLY TableRep; TableRep: TYPE = RECORD [rep: PRIVATE REF, case: BOOL, cache: BOOL]; GeneratorProc: TYPE = PROC [design: CD.Design, key: Rope.ROPE, table: Table, data: REF] RETURNS [ob: CD.Object_NIL]; Create: PROC [case: BOOL _ TRUE, cache: BOOL _ TRUE] RETURNS [Table]; Clear: PROC [table: Table]; Register: PROC[table: Table, key: Rope.ROPE, generator: GeneratorProc, cache: BOOL_TRUE, data: REF_NIL] RETURNS [first: BOOL]; FetchRegistration: PROC[table: Table, key: Rope.ROPE] RETURNS [generator: GeneratorProc, cache: BOOL, data: REF]; FetchCached: PROC[table: Table, design: CD.Design, key: Rope.ROPE] RETURNS [CD.Object]; FetchNCall: PROC[table: Table, design: CD.Design, key: Rope.ROPE, cache: BOOL_TRUE] RETURNS [CD.Object]; Flush: PROC [table: Table, design: CD.Design, key: Rope.ROPE]; FlushAll: PROC [table: Table, design: CD.Design]; SelectOneOf: PROC[table: Table, label: Rope.ROPE] RETURNS [key: Rope.ROPE]; AssertTable: PROC [project: Rope.ROPE] RETURNS [Table]; publicTables: PRIVATE SymTab.Ref; END. tCDGenerate.mesa (part of ChipNDale) Copyright c 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, June 5, 1985 8:02:35 pm PDT Last Edited by Christian Jacobi, June 19, 1985 2:42:17 pm PDT --creates a new, empty table --undo all registrations --first if key did not already exist --cache: tries to cache the result --data: passed through to FetchNCall calling generator Caching genenerated objects: to avoid multiple generation of aequivalent objects. The user assumes that he might reuse an object instead of creating a new object, whenever he uses the caching scheme... --generator NIL if not found --returns NIL if not found, not cached or looks different --returns NIL if not found or generated --caching only if generator and this call want caching --Removes this entry from the cache --Removes all entries from the cache --convenient procedures --Interactive selection --NIL if discarded --Fetches a table; if not done then create one and store it for next call of AssertTable. --This table can be imported by lots of unknown applications... --space for tables to be returned or created using AssertTable Êš˜šœ#™#Jšœ Ïmœ1™Jšœ#™#—J˜š œžœ#˜1Jšœ$™$—J˜J™Jšœ™J˜š   œžœžœžœ žœ˜KJšœ™Jšœ™—J˜š  œžœžœžœ ˜7JšœY™YJšœ?™?—J˜šœžœ ˜!Jšœ>™>—J˜Jšžœ˜J˜—…—f t