<> <> <<>> DIRECTORY RTSets, SC, SCChanUtil, SCInstUtil, SCNetUtil, SCPrivate, SCRowUtil; SCChanUtilImpl: CEDAR PROGRAM IMPORTS SCChanUtil, SCNetUtil, SCRowUtil EXPORTS SCChanUtil SHARES SC = BEGIN <> ClearRouteDat: PUBLIC PROCEDURE [handle: SC.Handle] = { RowProc: SCRowUtil.EachRowProc = { lgRow.nFtsOnRow _ 0; lgRow.dimInvalid _ TRUE}; NetProc: SCNetUtil.EachNetProc = { net.ftsOnRow _ RTSets.RTMdSetEmpty; net.rowExits[left] _ net.rowExits[right] _ RTSets.RTMdSetEmpty}; [] _ SCRowUtil.EnumerateRows[handle, RowProc]; [] _ SCNetUtil.EnumerateNets[handle, NetProc]; }; <<>> <> InitChanWidths: PUBLIC PROCEDURE [handle: SC.Handle] = { RowChanProc: SCChanUtil.EachRowChanProc = { rowChan.chanWidth _ rowChan.initChanWidth}; SideChanProc: SCChanUtil.EachSideChanProc = { sideChan.sideChanWidth _ sideChan.initSideChanWidth}; [] _ SCChanUtil.EnumerateRowChans[handle, RowChanProc]; [] _ SCChanUtil.EnumerateSideChans[handle, SideChanProc]; }; EnumerateRowChans: PUBLIC PROC [handle: SC.Handle, eachRowChan: SCChanUtil.EachRowChanProc] RETURNS [quit: BOOL] = { layoutData: SCPrivate.LayoutData _ NARROW[handle.layoutData]; rowChans: SCPrivate.RowChans _ layoutData.rowChans; FOR chan: NAT IN [1 .. rowChans.count] WHILE ~quit DO quit _ eachRowChan[chan, rowChans.chans[chan]]; ENDLOOP}; EnumerateSideChans: PUBLIC PROC [handle: SC.Handle, eachSideChan: SCChanUtil.EachSideChanProc] RETURNS [quit: BOOL] = { layoutData: SCPrivate.LayoutData _ NARROW[handle.layoutData]; sideChans: SCPrivate.SideChans _ layoutData.sideChans; FOR lrSide: SCPrivate.LRSide IN SCPrivate.LRSide WHILE ~quit DO quit _ eachSideChan[lrSide, sideChans[lrSide]]; ENDLOOP}; EnumerateExits: PUBLIC PROC [handle: SC.Handle, rowChan: SCPrivate.RowChan, lrSide: SCPrivate.LRSide, eachExit: SCChanUtil.EachExitProc] RETURNS [quit: BOOL] = { FOR exit: NAT IN [1 .. rowChan.numExits[lrSide]] WHILE ~quit DO quit _ eachExit[exit, lrSide, rowChan, rowChan.exits[lrSide][exit]]; ENDLOOP}; END.