<> <> <> <> DIRECTORY CD, Rope; CDCleanUp: CEDAR DEFINITIONS = BEGIN <> <> <> CleanUp: PROC [design: CD.Design, rootOb: CD.Object_NIL]; <<--General clean up of designs created using lazy programs>> <<--IF rootOb#NIL only rootOb and its descendants are cleaned up >> <<-- (but the replace step checks the whole design anyway)>> <<--All objects of funny classes are replaced>> <<--All objects which are not included in a directory, but should, will be included>> <<-- Those objects must therefore not be used by other processes; callers responsibility. >> <<--All objects which are in the directory of some other design will be replaced with a copy.>> ReplaceTagged: PROC [design: CD.Design, replaceBy: REF, rename: BOOL_TRUE, key: REF_NIL]; <<--Every object in the design is checked whether it has a replaceBy property pointing to>> <<--an other object. Every instance of the object is then replaced by the other object.>> <<--Directory invariants must hold (except for objects which will be replaced).>> <<-- The object used for replacement must already be in the designs directory.>> <<-- No funny object classes.>> <<--rename: tries to rename replacing objects by name of replaced object>> <<--key: a property key which will be used freely... NIL is ok>> RemoveProperties: PROC [design: CD.Design, key: REF]; <<--Tries to remove the propertiy "key" from all objects of "design";>> <<--May be delayed or incomplete>> END.