DIRECTORY CD, CDDefaults, CDDefaultsExtras, CDPrivate, CDProperties, CDValue; CDDefaultsImpl: CEDAR PROGRAM IMPORTS CDPrivate, CDProperties, CDValue EXPORTS CDDefaults, CDDefaultsExtras = BEGIN CurrentLayer: PUBLIC PROC [design: CD.Design] RETURNS [CD.Layer] = BEGIN RETURN [CDValue.FetchInt[boundTo: design, key: $CurrentLayer, propagation: technology]] END; SetCurrentLayer: PUBLIC PROC [design: REF, layer: CD.Layer] = BEGIN CDValue.StoreInt[boundTo: design, key: $CurrentLayer, value: layer] END; LayerWidth: PUBLIC PROC [design: CD.Design, layer: CD.Layer] RETURNS [CD.Number] = BEGIN RETURN [CDValue.FetchInt[boundTo: design, key: CDPrivate.layers[layer].globalUniqueKey, propagation: technology]] END; SetLayerWidth: PUBLIC PROC [design: REF, layer: CD.Layer, width: CD.Number] = BEGIN CDValue.StoreInt[boundTo: design, key: CDPrivate.layers[layer].globalUniqueKey, value: width] END; Substitute: PUBLIC PROC [abstract: CD.Layer, pure: CD.Layer] = BEGIN CDProperties.PutPropOnLayer[onto: abstract, prop: privateProp, val: CDPrivate.layers[pure]] END; PureLayer: PUBLIC PROC [layer: CD.Layer] RETURNS [CD.Layer] = BEGIN WITH CDProperties.GetPropFromLayer[from: layer, prop: privateProp] SELECT FROM lp: CDPrivate.LayerRef => RETURN [lp.number]; ENDCASE => RETURN [layer]; END; privateProp: REF INT _ NEW[INT]; CDValue.EnregisterKey[key: $CurrentLayer, boundTo: NIL]; FOR l: CD.Layer IN CD.Layer DO [] _ CDValue.EnregisterKey[CDPrivate.layers[l].globalUniqueKey]; ENDLOOP; END. ÂCDDefaultsImpl.mesa (part of ChipNDale) Copyright c 1983, 1985 by Xerox Corporation. All rights reserved. by Christian Jacobi, August 11, 1983 11:32 am last edited by Christian Jacobi, March 30, 1985 3:52:03 pm PST --design can exceptionally be a technology to set default values --reserve call for CDPanelImpl; otherwise CDPanel gets fooled -- design can exceptionally be a technology to set default values -- reserve call for CDPanelImpl; otherwise CDPanel gets fooled --only technology implementor should call this procedure --returns corresponding real layer --usage: given layer as control panel value, this returns mask layer to be used --for cases which do not accept abstract layers ÊŸ˜šœ.™.Jšœ Ïmœ7™BJšœ.™.Jšœ>™>—J˜šÏk ˜ Jšžœ˜J˜ J˜J˜ Jšœ ˜ Jšœ˜J˜—šÏbœžœžœ˜Jšžœ!˜(Jšžœ˜&—Jšž˜J˜š Ïn œžœžœ žœ žœžœ ˜BJšž˜JšžœQ˜WJšžœ˜J˜—š  œžœžœ žœ žœ ˜=Jšž˜JšœC˜CJšžœ˜Jšœ@™@Jšœ=™=J˜—š  œžœžœ žœžœžœžœ ˜RJšž˜Jšžœk˜qJšžœ˜J˜—š   œžœžœ žœ žœžœ ˜MJšž˜Jšœ]˜]Jšžœ˜JšœA™AJšœ>™>J˜—š   œžœžœ žœžœ ˜>Jšœ8™8Jšž˜Jšœ[˜[Jšžœ˜—J˜š   œžœžœ žœžœžœ ˜=Jšœ"™"JšœO™OJšœ/™/Jšž˜šžœ?žœž˜NJšœžœ ˜-Jšžœž œ ˜—Jšžœ˜—J˜Jš œ žœžœžœžœ˜ Jšœ3žœ˜8š žœžœžœžœž˜Jšœ@˜@Jšžœ˜—Jšžœ˜J˜J˜J˜—…—Ú ;