CDDirectoryOps.mesa (a ChipNDale module)
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, June 3, 1985 7:04:20 pm PDT
Last edited by: Christian Jacobi, September 22, 1986 4:20:22 pm PDT
DIRECTORY
CD USING [Design, Object],
Rope USING [ROPE];
CDDirectoryOps: CEDAR DEFINITIONS =
BEGIN
Higher level directory functions.
RemoveIfUnused: PROC [design: CD.Design, ob: CD.Object] RETURNS [done: BOOL, msg: Rope.ROPE];
--Removes ob from the directory.
--but succeeds only if the object is not used anywhere else in the design.
--msg←NIL if succeded without problem.
--Uses CDMarks!
PruneDirectory: PROC [design: CD.Design, autoOnly: BOOL FALSE, askFirst: BOOL FALSE];
--Removes objects which are not used in the design from the directory.
--autoOnly: only objects with names starting with a special letter
--askFirst makes it verbose
--Uses CDMarks!
RenameNRemove: PROC [design: CD.Design, ob: CD.Object, name: Rope.ROPE];
--Tries hard to rename ob
--Removes conflicting ob from directory if possible
--Uses CDMarks!
END.