-- File: IPCIGImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Preas, August 18, 1986 5:00:29 pm PDT
Provide operations on a channel intersection graph
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] ~ {
Add the Pin to cig.
}; -- InsertPin --
RemovePin: PUBLIC PROC[cig: IPCIG.Ref, comp: IPCoTab.Component] ~ {
Remove a pin from cig
}; -- 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: BOOLTRUE, drawComp:BOOLFALSE, showCompName: BOOLTRUE]={
}; --PaintSelf --
END.