DIRECTORY Core, CoreRecord; CoreProperties: CEDAR DEFINITIONS = BEGIN OPEN Core; GetProp: PROC [from: Properties, prop: ATOM] RETURNS [value: REF ANY _ NIL]; PutProp: PROC [on: Properties, prop: ATOM, value: REF ANY _ NIL] RETURNS [new: Properties]; CopyProps: PROC [propList: Properties] RETURNS [copy: Properties]; AppendProps: PROC [winner, loser: Properties] RETURNS [copy: Properties]; Enumerate: PROC [props: Properties, consume: PROC [prop: ATOM, val: REF ANY _ NIL]]; PrintProperties: PROC [props: Properties, out: STREAM, depth: NAT _ 0]; RegisterProperty: PROC [prop: ATOM, properties: Properties _ NIL] RETURNS [sameProp: ATOM]; StoreProperties: PROC [prop: ATOM, properties: Properties]; FetchProperties: PROC [prop: ATOM] RETURNS [properties: Properties]; propPrettyPrint, propRead, propWrite, propCopy, propCompare: ATOM; PropDontPrint: PROC[prop: ATOM]; -- causes nothing to be printed PropCompareProc: TYPE = PROC [prop: ATOM, value1, value2: REF ANY] RETURNS [equal: BOOL _ FALSE]; PropCopyProc: TYPE = PROC [prop: ATOM, value: REF ANY] RETURNS [valCopy: REF ANY]; PropWriteProc: TYPE = PROC [out: STREAM, val: REF ANY]; PropReadProc: TYPE = PROC [in: STREAM] RETURNS [val: REF ANY]; PropPrettyPrintProc: TYPE = PROC [to: STREAM, prop: ATOM, val: REF ANY, depth: NAT]; PropDoCopy: REF PropCopyProc; -- Copy of val; trivial procedure; for some types it is a default PropRopeCompare: PropCompareProc; PropIntCompare: PropCompareProc; PropRopeWrite: PropWriteProc; PropAtomWrite: PropWriteProc; PropIntWrite: PropWriteProc; PropRopeRead: PropReadProc; PropAtomRead: PropReadProc; PropIntRead: PropReadProc; PropertyLiteral: TYPE = RECORD [key: ATOM, val: REF ANY _ NIL]; Props: PROC [lit1, lit2, lit3, lit4, lit5, lit6: PropertyLiteral _ []] RETURNS [properties: Properties]; GetDesignProp: PROC [from: Design, prop: ATOM] RETURNS [value: REF ANY _ NIL]; PutDesignProp: PROC [on: Design, prop: ATOM, value: REF ANY _ NIL]; GetWireProp: PROC [from: Wire, prop: ATOM] RETURNS [value: REF ANY _ NIL]; PutWireProp: PROC [on: Wire, prop: ATOM, value: REF ANY _ NIL]; GetCellTypeProp: PROC [from: CellType, prop: ATOM] RETURNS [value: REF ANY _ NIL]; PutCellTypeProp: PROC [on: CellType, prop: ATOM, value: REF ANY _ NIL]; GetCellInstanceProp: PROC [from: CoreRecord.CellInstance, prop: ATOM] RETURNS [value: REF ANY _ NIL]; PutCellInstanceProp: PROC [on: CoreRecord.CellInstance, prop: ATOM, value: REF ANY _ NIL]; END. €CoreProperties.mesa Copyright c 1985 by Xerox Corporation. All rights reversed. Barth, October 2, 1985 11:30:37 am PDT Spreitzer, August 12, 1985 6:05:07 pm PDT Bertrand Serlet October 2, 1985 12:08:17 pm PDT Theory This interface deals with properties. Operations If value is NIL then no such property. If value is NIL then the property is deleted. Uses the property-property propCopy to copy each item. Uses the property-property propCopy to copy each item. Uses the property-property propPrettyPrint to print each item. Registration Should be called by every tool which uses a property. Sets the properties proterties as given in the second argument. Returns the argument so that definition and registration can occur in the same line of Cedar code. To store properties on properties. To fetch properties on properties. Values should be REFs to procs of the appropriate TYPEs. No PropCompareProc means pointer comparison. No PropCopyProc means don't copy the property. No PropWriteProc means don't write the property. No PropReadProc means make an ERROR. No PropPrettyPrintProc means it pretty prints as property atom only. If valCopy is NIL then don't copy. Short Cuts ΚŸ˜– "Cedar" stylešœ™Jšœ Οmœ1™™>——™ š Ÿœžœžœžœžœ žœ˜[K™Ϊ—J˜šŸœžœžœ˜;K™"K™—šŸœžœžœžœ˜DK™"—K˜Kšœ=žœ˜BK™™8Kšœ,™,Kšœ.™.Kšœ0™0Kšœ$™$KšœD™D—K˜šΠbn œžœžœΟc˜AK˜—šŸœžœžœžœžœžœžœ žœžœ˜aK˜—šŸ œžœžœžœ žœžœžœ žœžœ˜RK™"J˜—š   œžœžœžœžœžœ˜8K˜—š  œžœžœžœžœžœžœ˜>K˜—šŸœžœžœžœžœžœžœ žœ˜TK˜—šΟb œžœ‘A˜_K™—Kš’œ˜!š’œ˜ K˜—Kš’ œ˜Kš’ œ˜š’ œ˜K˜—Kš’ œ˜Kš’ œ˜š’ œ˜K˜——™ š œžœžœžœžœžœžœ˜?K˜—KšŸœžœ<žœ˜hK˜šŸ œžœžœžœ žœžœžœ˜NK˜—š Ÿ œžœžœ žœžœžœ˜CK˜—šŸ œžœžœžœ žœžœžœ˜JK˜—š Ÿ œžœžœ žœžœžœ˜?K˜—šŸœžœžœžœ žœžœžœ˜RK˜—š Ÿœžœžœ žœžœžœ˜GK˜—šŸœžœ'žœžœ žœžœžœ˜eK˜—š Ÿœžœ%žœ žœžœžœ˜ZK˜——Jšžœ˜—…— œί