CDRemoteImpl.mesa (part of ChipNDale)
Copyright © 1985, 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 6:17:33 pm PDT
DIRECTORY
CD,
CDDesignCache,
CDGenerate,
CDGenerateRemote,
CDRemote,
Rope;
CDRemoteImpl: CEDAR PROGRAM
IMPORTS CDDesignCache, CDGenerateRemote
EXPORTS CDRemote =
BEGIN
GetContext: PUBLIC PROC [remoteDesign: Rope.ROPE] RETURNS [context: CDGenerate.Context←NIL] = {
context ← CDGenerateRemote.GetRemoteContext[remoteDesign];
};
Get: PUBLIC PROC [for: CD.Design, remoteDesign: Rope.ROPE, object: Rope.ROPE] RETURNS [ob: CD.Object] = {
ob ← CDGenerateRemote.GetRemoteObject[for, remoteDesign, object];
};
DesignName: PUBLIC PROC [context: CDGenerate.Context] RETURNS [r: Rope.ROPENIL] = {
r ← CDGenerateRemote.RemoteDesignName[context];
};
CacheDesign: PUBLIC PROC [for: CD.Design, remote: CD.Design] = {
CDDesignCache.Set[for, remote];
};
FetchDesign: PUBLIC PROC [for: CD.Design, name: Rope.ROPE] RETURNS [remote: CD.Design ← NIL] = {
remote ← CDDesignCache.Fetch[for, name];
};
IsCached: PUBLIC PROC [for: CD.Design, remoteDesign: Rope.ROPE] RETURNS [BOOL] = {
RETURN [CDDesignCache.IsCached[for, remoteDesign]]
};
ForgetCache: PUBLIC PROC [for: CD.Design, remoteDesign: Rope.ROPE] = {
CDDesignCache.Forget[for, remoteDesign]
};
LoadCache: PUBLIC PROC [for: CD.Design, remoteDesign: Rope.ROPE, remoteFile: Rope.ROPENIL, reload: BOOLFALSE] RETURNS [loaded: BOOL] = {
loaded ← CDDesignCache.GetOrRead[for: for, remoteName: remoteDesign, remoteFile: remoteFile, reload: reload, checkFile: TRUE].remote#NIL;
};
MakupName: PUBLIC PROC [for: CD.Design, remoteDesign: Rope.ROPE] RETURNS [f: Rope.ROPENIL] = {
f ← CDDesignCache.MakeUpFile[for, remoteDesign];
};
END.