DIRECTORY CD USING [Object, Instance, Design, DrawRef], Rope USING [ROPE]; CDConditions: CEDAR DEFINITIONS = BEGIN ConditionProc: TYPE = PROC [me: CD.Instance, environment: CD.DrawRef] RETURNS [drawMe: BOOL_TRUE]; IsCondition: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE { RETURN [ISTYPE[ob.specificRef, CondPtr]] }; CondPtr: TYPE = REF CondRec; CondRec: TYPE = RECORD [ inst: CD.Instance, condition: ConditionProc_NIL, data: REF_NIL, cache: REF_NIL, -- speed up for condition's internal usage; --may be modified at runtime as controlled side effect fileName: Rope.ROPE_NIL, procName: Rope.ROPE_NIL, -- actually moduleName.procName myData: PRIVATE REF_NIL ]; CreateCondition: PROC [design: CD.Design, ob: CD.Object, condition: ConditionProc_NIL, data: REF_NIL] RETURNS [CD.Object]; ChangeCondition: PROC [design: CD.Design, ob: CD.Object, fileName, procName: Rope.ROPE_NIL, data: REF_NIL, condition: ConditionProc_NIL] RETURNS [done: BOOL]; UpdateConditions: PROC [design: CD.Design, doAll: BOOL_TRUE] RETURNS [done: BOOL]; END. `CDConditions.mesa (part of ChipNDale) Copyright c 1984 by Xerox Corporation. All rights reserved. by Christian Jacobi, May 4, 1984 last edited by Christian Jacobi, May 10, 1984 11:10:29 am PDT --vanilla stuff for designers and implementors of ConditionProc's -- condition procedures better have no arbitrary side effects; they are evaluated -- in unspecified order, or sometimes not at all. -- me.ob.specificRef is defined and of type CondPtr. --ChipNDale internal and client stuff --there are restrictions on the type of data; (because of IO!) --ob must already be a conditional object. --if condition is nil, tries to evaluate fileName, procName. --procName can be prefixed by a modulename. --redraws the complete design. --there are restrictions on the type of data. --done means condition evaluated according parameters. --the fileName and procName fields are set independently of the "done" return. --checks if any conditions have been recompiled and reloads them --doAll TRUE: checks all, including already loded conditions --doAll FALSE: checks the conditions which are not already loded Ê}˜šœ,™,Jšœ Ïmœ1™™>—J˜šÏk ˜ Jšžœžœ%˜-Jšœžœžœ˜J˜—JšÏb œžœž œ˜!Jšž˜J˜J˜JšŸA™AJ˜šÏn œžœžœžœžœ žœ žœžœ˜bJšœR™RJšœ2™2Jšœ4™4—J˜J™JšŸ%™%J˜š   œžœžœ žœžœžœ˜;Jšžœžœ˜(J˜—J˜Jšœ žœžœ ˜šœ žœžœ˜Jšœžœ ˜Jšœžœ˜Jšœžœžœ˜šœžœžœÏc,˜=Jšœ¡5˜7—Jšœžœžœ˜Jšœžœžœ¡˜8Jšœž˜Jšœ˜—J˜š œžœ žœ žœ"žœžœžœžœžœ ˜zJšœ>™>—J™šÐbnœžœ žœ žœ"žœžœžœžœžœžœžœ˜žJšœ*™*Jšœ<™