<<-- File: IPCIGImpl.mesa>> <> <> <> <<>> DIRECTORY CCG, Convert, Imager, IPConstants, IPCoTab, IPCIG, IPCTG, IPTop, TerminalIO; IPCIGImpl: CEDAR PROGRAM IMPORTS CCG, Convert, IPCTG, TerminalIO EXPORTS IPCIG = BEGIN Create: PUBLIC PROC[top: IPTop.Ref] RETURNS[cig: IPCIG.Ref _ NIL]={ pI: IPCTG.EachIntersectionAction ={ TerminalIO.WriteRopes["\n\t\t\t", i.ch.name, ", type: "]; TerminalIO.WriteRopes[Convert.RopeFromInt[i.type]]}; --pI-- pCh: IPCTG.EachChannelAction ={ TerminalIO.WriteRopes["\n\t", ch.name, ", "]; TerminalIO.WriteRopes[SELECT ch.type FROM hor => "hor", ver => "ver", ENDCASE => ERROR, ", "]; TerminalIO.WriteRopes[Convert.RopeFromInt[ch.coord], ", ", Convert.RopeFromInt[ch.width]]; TerminalIO.WriteRope["\n\t\tEnd Intersections:"]; [] _ pI[IPCTG.End[ch, neg]]; [] _ pI[IPCTG.End[ch, pos]]; IF ~IPCTG.NoIntersection[ch, neg] THEN { TerminalIO.WriteRope["\n\t\tInferior Interior Intersections:"]; [] _ IPCTG.Intersections[ch, neg, pI]}; IF ~IPCTG.NoIntersection[ch, pos] THEN { TerminalIO.WriteRope["\n\t\tSuperior Interior Intersections:"]; [] _ IPCTG.Intersections[ch, pos, pI]}; }; --pCh-- TerminalIO.WriteRope["\nChannel Intersection Graph"]; TerminalIO.WriteRopes["\n Horizontal channels: ", Convert.RopeFromInt[CCG.Size[top.ctg.horCCG]]]; [] _ IPCTG.DirectedChannels[top.ctg, pCh, hor]; TerminalIO.WriteRopes["\n Vertical channels: ", Convert.RopeFromInt[CCG.Size[top.ctg.verCCG]]]; [] _ IPCTG.DirectedChannels[top.ctg, pCh, ver]; TerminalIO.WriteRope["\nEnd Channel Intersection Graph\n"]; }; -- Create -- Destroy: PUBLIC PROC [cig: IPCIG.Ref] ={ }; -- Destroy -- InsertPin: PUBLIC PROC[cig: IPCIG.Ref, comp: IPCoTab.Component] ~ { <> }; -- InsertPin -- RemovePin: PUBLIC PROC[cig: IPCIG.Ref, comp: IPCoTab.Component] ~ { <> }; -- RemovePin -- Verify: PUBLIC PROC [cig: IPCIG.Ref] ={ }; -- Verify-- PaintSelf: PUBLIC PROC[cig: IPCIG.Ref, context: Imager.Context, xOffset, yOffset: REAL, scaleFactor: REAL _ 1.0, stipple: CARDINAL _ IPConstants.Gray, drawOutline: BOOL _ TRUE, drawComp:BOOL _ FALSE, showCompName: BOOL _ TRUE]={ }; --PaintSelf -- END.