<> <> <> <> <> DIRECTORY CD USING [Instance, Object, ObjectClass, Design]; CDIndirectObjects: CEDAR DEFINITIONS = BEGIN <> IsIndirect: PROC [ob: CD.Object] RETURNS [BOOL] = INLINE { RETURN [ ob.class=indirectClass ] }; Indirectee: PROC [indOb: CD.Object] RETURNS [CD.Object] = INLINE { <<--peels of one layer of indirection>> RETURN [IF indOb.class=indirectClass THEN NARROW[indOb.specificRef, CD.Instance].ob ELSE indOb] }; CreateIndirect: PROC [design: CD.Design, pointOb: CD.Object, reduce: BOOL_TRUE] RETURNS [indOb: CD.Object]; <<--creates an indirect object pointing to pointOb>> <<--design: where pointOb already is and indOb will be included>> ReduceIndirect: PROC [design: CD.Design, indOb: CD.Object] RETURNS [changed: BOOL]; <<--get rid of multiple layers of indirection>> <<--indOb will point to an object which is not an indirect object itself anymore>> ChangeIndirect: PUBLIC PROC [design: CD.Design, indOb: CD.Object, pointNew: CD.Object]; <<--changes indOb to be an indirection to pointNew>> indirectClass: REF --READONLY-- CD.ObjectClass; <<>> END.