CDRepetitions.mesa (part of ChipNDale)
Copyright © 1983, 1985 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, October 27, 1983 3:36 pm
Last edited by: Christian Jacobi, September 26, 1986 2:23:30 pm PDT
DIRECTORY
CD USING [Position, Object, Orientation, Design, Rect];
CDRepetitions: CEDAR DEFINITIONS =
BEGIN
IsRepetition:
PROC [ob:
CD.Object]
RETURNS [
BOOL] =
INLINE {
RETURN [ ISTYPE[ob.specific, RepSpecific] ]
};
RepSpecific: TYPE = REF RepRec;
RepRec:
TYPE =
RECORD [
ob: CD.Object,
ir: CD.Rect,
orientation: CD.Orientation,
offset: CD.Position,
count: NAT
];
CreateRepetition:
PROC [design:
CD.Design, ob:
CD.Object, count:
NAT, offset:
CD.Position, orientation:
CD.Orientation←
CD.Orientation[original]]
RETURNS [
CD.Object];
--count <= 256
END.