CDDirectoryOps.mesa (a ChipNDale module)
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
by Christian Jacobi, June 3, 1985 7:04:20 pm PDT
last edited Christian Jacobi, March 14, 1986 6:34:38 pm PST
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.