<> <> <> <> <> <<-- Internal definitions for Parquet.>> <<>> <<>> DIRECTORY Rope USING [ROPE], SymTab USING [Ref], Parquet USING [Tile, PlacedTile, Mark, Module, Position, Orientation], CD USING [Design, ObPtr, Position, ApplicationList, Number, lambda], CDOrient USING [MapPoint]; ParquetInternal: CEDAR DEFINITIONS IMPORTS CDOrient = BEGIN ShiftedCell: TYPE = REF ShiftedCellRec; ShiftedCellRec: TYPE = RECORD [ -- like a ChipNDale cell but origin is not at lower-left corner llCorner: CD.Position _ [LAST[CD.Number], LAST[CD.Number]], urCorner: CD.Position _ [FIRST[CD.Number], FIRST[CD.Number]], contents: CD.ApplicationList _ NIL, name: Rope.ROPE _ NIL, parent: ShiftedCell _ NIL, children: LIST OF ShiftedCell _ NIL -- sizes of children not included in llCorner and urCorner ]; Mod: TYPE = REF ModRec; ModRec: TYPE = RECORD [ <<-- default marks for convertion to a tile>> ur, ul, ll, lr, top, bottom, left, right: REF CD.Position _ NIL, eventualOwner: CD.Design _ NIL, -- a design that will receive the module current: ShiftedCell _ NIL, topCell: ShiftedCell _ NIL, cellTab: SymTab.Ref _ NIL, checkTable: VerficationTable _ NIL, inheritedErrors: CARDINAL _ 0 ]; verificationTableSize: INT = 5047; -- hash table size VerficationTable: TYPE = REF VerficationTableRec; VerficationTableRec: TYPE = ARRAY [0..verificationTableSize) OF PlacedCheckList _ ALL[NIL]; PlacedCheckList: TYPE = LIST OF PlacedCheck; PlacedCheck: TYPE = RECORD [ duplicate: BOOL _ FALSE, pos: CD.Position ]; ModuleIntoCell: PROC [module: Parquet.Module, name: Rope.ROPE _ NIL, applicationsPerScreenDot: INT _ -1] RETURNS [CD.ObPtr]; CheckValid: PROC [module: Parquet.Module] RETURNS [Mod]; <<-- apply an orientation to a point>> MapPoint: PUBLIC PROC [p: Parquet.Position, cellSize: Parquet.Position, orient: Parquet.Orientation] RETURNS [Parquet.Position] = INLINE BEGIN RETURN[CDOrient.MapPoint[ pointInCell: p, cellSize: cellSize, cellInstOrient: orient]]; END; <<>> <<-- store one mark into a tile>> StoreMark: PROC [t: Parquet.Tile, m: Parquet.Mark]; <<-- create default marks for a tile>> DefaultMarks: PROC [t: Parquet.Tile, m: Mod _ NIL]; <<-- Procedure to rotate & mirror standard marks by exchanging them with each other.>> OrientStdMark: PROC [cell: Parquet.Tile, orient: Parquet.Orientation] RETURNS [left, right, top, bottom, ul, ur, ll, lr: Parquet.Mark]; <<-- Update the default marks for a module now that a new tile has been placed>> SetModDefaults: PUBLIC PROC [m: Mod, pc: Parquet.PlacedTile]; <<>> END.