SystemSiteImpl.mesa
Copyright Ó 1987, 1991, 1992 by Xerox Corporation. All rights reserved.
Derived from DefaultRemoteNamesImpl.mesa by Doug Wyatt, January 17, 1987
Doug Wyatt, January 24, 1987 7:52:25 pm PST
Chauser, January 3, 1991 3:41 pm PST
Michael Plass, November 11, 1992 3:55 pm PST
DIRECTORY
RegisterRefLiteral USING [Create],
Rope USING [ROPE],
SystemSite USING [Names];
SystemSiteImpl: CEDAR MONITOR
IMPORTS RegisterRefLiteral
EXPORTS SystemSite ~ {
current: REF SystemSite.Names ¬ NIL;
Get: PUBLIC ENTRY PROC RETURNS [SystemSite.Names] ~ {
IF current = NIL THEN current ¬ NEW[SystemSite.Names ¬ [registry: MakeRope["pa"], domain: MakeRope["PARC"], organization: MakeRope["Xerox"]]];
RETURN [current­]
};
Set: PUBLIC ENTRY PROC [new: SystemSite.Names] ~ {
IF current = NIL THEN current ¬ NEW[SystemSite.Names];
current­ ¬ new;
};
MakeRope: PROC [ s: STRING ] RETURNS [Rope.ROPE] ~ {
RETURN[NARROW[RegisterRefLiteral.Create[CODE[Rope.ROPE], s]]];
};
}.