<> <> <> <> DIRECTORY CD USING [combined, Position, Rect, highLightError, Layer, ObjectClass, Object, Technology], Rope USING [ROPE]; CDAtomicObjects: CEDAR DEFINITIONS = BEGIN <> <<>> <<--common proc's and types>> <<>> IsAtomicOb: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE { RETURN [ISTYPE[ob.specificRef, AtomicObsPtr]] }; CreateAtomicOb: PROC [classKey: ATOM, size: CD.Position, tech: CD.Technology, lev: CD.Layer_CD.combined] RETURNS [CD.Object]; <<--NIL if not done>> <<--Reuses objects in cache if possible>> DrawRec: TYPE = RECORD [r: CD.Rect, lev: CD.Layer _ CD.highLightError]; DrawList: TYPE = LIST OF DrawRec; AtomicObsPtr: TYPE = REF AtomicObsRec; AtomicObsRec: TYPE = RECORD [ --do not change directly rList: DrawList_NIL, ir: CD.Rect ]; <<>> <<--technology implementor's proc's and type's>> <<>> FillObjectProc: TYPE = PROC [ob: CD.Object] RETURNS [mustFail: BOOL _ FALSE]; <<--read (and even rewrite) size, layer>> <<--calls IncorporateRect>> <<--do not read or write AtomicObsRec directly>> <<--rList will be initialized to NIL>> RegisterAtomicObClass: PROC [classKey: ATOM, fillProc: FillObjectProc, description: Rope.ROPE _ NIL, tech: CD.Technology _ NIL] RETURNS [type: REF CD.ObjectClass]; <<--drawMe, quickDrawMe are considered variables and should not >> <<--be changed by class implementor.>> Incorporate: PROC [ob: CD.Object, r: CD.Rect, lev: CD.Layer, inside: BOOL _ TRUE]; END.