DIRECTORY CD, Rope; CDImports: CEDAR DEFINITIONS = BEGIN IsImport: PROC [ob: CD.ObPtr] RETURNS [BOOL] = INLINE { RETURN [ISTYPE[ob.specificRef, ReferencePtr]] }; ReferencePtr: TYPE = REF ReferenceRep; ReferenceRep: TYPE = RECORD [ boundApp: CD.ApplicationPtr _ NIL, -- NIL if not yet bound ir: CD.DesignRect _ [0, 0, -1, -1], objectName: Rope.ROPE _ NIL, designName: Rope.ROPE _ NIL ]; ImportList: TYPE = RECORD [list: LIST OF REF Import]; -- describes all the imports of a design Import: TYPE = RECORD[ -- describes imports of one particular importee-design importee: CD.Design _ NIL, -- NIL means not yet bound importeeName: Rope.ROPE _ NIL, referenceList: LIST OF CD.ObPtr _ NIL -- all references must be accessible, ]; BoolOrInteractive: TYPE = {true, false, interactive}; GetReference: PROC [design: CD.Design, objectName, importeeName: Rope.ROPE] RETURNS [ob: CD.ObPtr]; GetImportList: PROC [design: CD.Design] RETURNS [REF ImportList]; GetImport: PROC [design: CD.Design, importeeName: Rope.ROPE, createIfNotFound: BoolOrInteractive_false] RETURNS [REF Import]; DoImport: PROC [design: CD.Design, importee: CD.Design, allowOverload, allowConflicts: BoolOrInteractive_true] RETURNS [done: BOOL]; MergeInImport: PROC [design: CD.Design, importeeName: Rope.ROPE]; HasUnloadedImports: PROC [d: CD.Design] RETURNS [BOOL]; END. @CDImports.mesa (part of ChipNDale) Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, March 20, 1984 5:50:51 pm PST last edited Christian Jacobi, April 11, 1985 1:02:08 pm PST -- no design is allowed to make circular imports -- to allow later binding. --importeeName must already be imported and object objectName must exist --Returns nil if not done. --Multiple creation may return same object. -- consider the list READONLY -- consider the returned record READONLY --You give up control of importee, which should not have any viewer. --Caller knows importee.name, which is the import which will be bound. --Procedure talks to TerminalIO. --Includes all the imported and bound objects from importeeName (including --their transitive closure; but not indirect imports) into design. Κ‘˜šœ$™$Jšœ Οmœ7™BJšœ3™3Jšœ;™;J˜—šΟk ˜ Jšžœ˜ J˜—JšΟb œžœž œ˜Jšž˜J˜J™0J˜š Οnœžœžœžœžœžœ˜7Jšžœžœ˜-J˜—J˜Jšœžœžœ˜&šœžœžœ˜Jšœ žœžœΟc˜;Jšœžœ˜#Jšœžœžœ˜Jšœžœž˜Jšœ˜—J˜Jš œ žœžœžœžœžœ ‘(˜_šœžœžœ‘6˜MJšœ žœ žœ‘˜5Jšœžœžœ˜ š œžœžœžœ žœ‘&˜LJšœ™—Jšœ˜—J˜J˜Jšœžœ˜5J˜š   œžœ žœ(žœžœžœ˜cJšœH™HJšœ™J™+—J˜codeš   œžœ žœ žœžœ ˜AKšœ™—J˜š   œžœ žœžœ-žœžœ ˜}Kšœ(™(J˜—šΠbnœžœ žœžœ˜7Jšœ7žœžœ˜NJšœD™DJšœF™FJ™ —J˜š  œžœ žœžœ˜AJšœL™LJšœB™B—J™Jš  œžœžœ žœžœ˜7J˜Jšžœ˜J˜—…—J +