DIRECTORY Pipal, PipalInt; PipalInstanceTable: CEDAR DEFINITIONS = BEGIN Value: TYPE = REF; Table: TYPE = REF TableRec; TableRec: PRIVATE TYPE = MONITORED RECORD [ rect: PipalInt.Rectangle, -- given at creation time, it retains the bbox of all rects. Clients should not change this field. leafBuckets: NAT, -- private field to detect when ReHashing is necessary. data: REF TableData ]; TableData: PRIVATE TYPE = RECORD [SEQUENCE size: NAT OF LIST OF InstanceValue]; InstanceValue: PRIVATE TYPE = RECORD [trans: PipalInt.Transformation, object: Pipal.Object, value: Value]; Create: PROC [rect: PipalInt.Rectangle, logSize: NAT _ 2] RETURNS [Table]; Insert: PROC [table: Table, trans: PipalInt.Transformation, object: Pipal.Object, value: Value]; Enumerate: PROC [table: Table, action: PROC [PipalInt.Transformation, Pipal.Object, Value], rect: PipalInt.Rectangle _ PipalInt.fullRectangle]; DeleteOutside: PROC [table: Table, rect: PipalInt.Rectangle _ PipalInt.emptyRectangle]; END. >PipalInstanceTable.mesa Copyright Σ 1987, 1988 by Xerox Corporation. All rights reversed. From Intervals, created by Bertrand Serlet, November 16, 1985 7:22:05 pm PST Bertrand Serlet, March 15, 1988 0:31:56 am PST Creates a new table with a suggested hash size of 2**logSize. Adds a new value in the table. The corresponding interval must lie in the creation rect, otherwise an ERROR might occur. This operation is monitored. Does NOT check if already member of the table. Enumerates all values of the table that overlap a given rect. The interval can be outside the rect of the table. This operation is NOT monitored. Deletes all occurences of instances that do not overlap rect in table. The interval can be outside the rect of the table. Table is erased when rect=PipalInt.emptyRectangle. This operation is monitored. ΚΜ– "cedar" style˜codešœ™KšœB™BKšœIΟk™LKšœ.™.K˜—š œ˜K˜—šΟnœœ œ˜-K˜—šœœœ˜K˜—šœœœ ˜š œ œœ œœ˜+KšœΟcc˜~Kšœ œŸ7˜IKšœœ ˜Kšœ˜—Kšœ œœœœœœœœ˜OJšœœœœF˜jK˜—šžœœ%œœ ˜JKšœ>™>K˜—šžœœT˜`Kšœ™KšœGœ ™YK™Kšœœ&™.K˜—šž œœœd˜Kšœ=™=Kšœ2™2Kšœœ ™ K˜—šž œœD˜WKšœF™FKšœ2™2Kšœ2™2K™K˜—Kšœ˜K˜—…—δξ