CDGenerateRemote.mesa (part of ChipNDale)
Copyright © 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, June 5, 1985 8:02:35 pm PDT
Last edited by: Christian Jacobi, April 9, 1987 5:56:18 pm PDT
DIRECTORY
CD,
CDGenerate,
Rope;
CDGenerateRemote: CEDAR DEFINITIONS =
BEGIN
This module implements transfering (copying) objects from one design into an other.
Transfered objects are cached; Transfering two objects in the same ChipNDale session (while the design stays in memory) will not create duplicate copies of the children objects. To guarantee correct cacheing, a copy of the source design is needed and the source design is specified with its name only.
GetRemoteContext: PROC [remoteDesign: Rope.ROPE] RETURNS [CDGenerate.Context];
--Creates a generator context, "generating" = fetching an object from the remote design.
--Generating objects with the context will cause reading remoteDesign if it
--is not loaded; the design read will then be cached for the destination design.
RemoteDesignName: PROC [context: CDGenerate.Context] RETURNS [Rope.ROPE];
--Returns design name of remote design, if context was generated using GetRemoteContext
GetRemoteObject: PROC [for: CD.Design, remoteDesign: Rope.ROPE, object: Rope.ROPE] RETURNS [CD.Object];
--Transferes object (and its children) from other remoteDesign.
--Reads remoteDesign if necessary.
--Returns NIL if object not found.
END.