CDCellsBackdoor.mesa (a ChipNDale module)
Copyright (C) 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, October 30, 1986 9:45:57 am PST
Last edited by: Christian Jacobi, October 30, 1986 1:37:21 pm PST
DIRECTORY
CD,
CDCells USING [InstEnumerator],
CDDirectory USING [ReplaceList],
Rope USING [ROPE];
CDCellsBackdoor: CEDAR DEFINITIONS =
BEGIN
cellClass: READONLY CD.ObjectClass;
PushedCellName: PROC [design: CD.Design] RETURNS [Rope.ROPE];
--Returns printable name for pushed in cell
ReplaceDirectChildForCell: PROC [me: CD.Object, design: CD.Design, replace: CDDirectory.ReplaceList] RETURNS [changed: BOOLFALSE];
--A CDDirectory.ReplaceDChildsProc for cells
CopyInsts: PROC [list: CD.InstanceList, seq: CD.InstanceSequence, inPlace: BOOLFALSE] RETURNS [lCopy: CD.InstanceList, sCopy: CD.InstanceSequence];
--Makes a copy; tries to convert to sequence mode
--inPlace: TRUE -> just reuse old Instances; FALSE -> copy the Instances
Bounds: PROC [list: CD.InstanceList←NIL, seq: CD.InstanceSequence←NIL, doIr: BOOLTRUE, doBb: BOOLTRUE] RETURNS [ir, bbox: CD.Rect];
--Computes bounding boxes
--If doIr then ir is the union of all interest rects
--If doBb then bbox is the union of all bounding boxes
EnumInsts: PROC [list: CD.InstanceList, seq: CD.InstanceSequence, proc: CDCells.InstEnumerator] RETURNS [quit: BOOL];
--Enumerates the instances of list and seq in unspecified order.
--If list or seq change while the enumeration, the changed and maybe other instances
--might not be enumerated correctly.
--Applies proc to each instance until proc returns TRUE or no more instances.
--Returns TRUE if some proc returns TRUE
END.