<> <> <> <> DIRECTORY CD, Rope; CDPinObjects: CEDAR DEFINITIONS = BEGIN <<--Pins are objects to associate names and properties to rectangular areas.>> <<>> <<--All the actual pins properties like name, layer, propertylist >> <<--and its semantics are bound to the InstanceRep.>> <<>> <<--In general, the meaning of a pin is not known, but it is assumed some>> <<--client program knows it. NIL owner means: >> <<-- At this area, connection in the particaular layer can be made.>> <<--Pin objects will NOT have an special interrest-rect specified, their interrest >> <<--area is the real rect. It is common to have several pins with the same name.>> pinLayer: READONLY CD.Layer; CreatePinOb: PROC [size: CD.Position] RETURNS [CD.Object]; IsPinOb: PROC [ob: CD.Object] RETURNS [BOOL]; CreatePinInstance: PROC [name: Rope.ROPE, rect: CD.Rect, lev: CD.Layer_CD.combined, owner: ATOM_NIL] RETURNS [CD.Instance]; IsPinApp: PROC [inst: CD.Instance] RETURNS [BOOL] = INLINE { RETURN [IsPinOb[inst.ob]] }; SetOwner: PROC [pinInstance: CD.Instance, owner: ATOM_NIL]; GetOwner: PROC [pinInstance: CD.Instance] RETURNS [ATOM]; <<--if owner is not NIL it must be registered with CDProperties>> SetName: PROC [pinInstance: CD.Instance, name: Rope.ROPE]; GetName: PROC [pinInstance: CD.Instance] RETURNS [Rope.ROPE]; SetLayer: PROC [pinInstance: CD.Instance, lev: CD.Layer]; GetLayer: PROC [pinInstance: CD.Instance] RETURNS [CD.Layer]; <<--if layer=CD.combined means: not yet determined, or either: pin has more complex functionality>> <<>> InstanceEnumerator: TYPE = PROC [inst: CD.Instance] RETURNS [quit: BOOL_FALSE]; EnumeratePins: PROC [ob: CD.Object_NIL, eachPin: InstanceEnumerator] RETURNS [quit: BOOL]; <<--Random order; changes on pins while the enumeration may or may not be seen. >> FindPins: PROC [ob: CD.Object_NIL, pinName: Rope.ROPE] RETURNS [CD.InstanceList]; <<--Returns all pins with name "name">> <<>> <<>> <<--For rect: use CDInstances.ARectO or ARectI>> <<--For size: use object size >> <<-- (Interestrects for pins must not be set).>> END.