PropRegistryImpl.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Created by Ken Pier, July 7, 1992 9:56 am PDT
DIRECTORY
RefTab, Rope, PropRegistry;
PropRegistryImpl: CEDAR PROGRAM IMPORTS RefTab EXPORTS PropRegistry = BEGIN
Register: PUBLIC PROC [class: PropRegistry.RegistryClass] = {
Add a RegistryClass to the Prop Registry; replaces any previously registered RegistryClass of the same "name". The "name" field of the RegistryClass may be identical to the "class" field of the ViewerClass for which this registry occurs.
IF class#NIL THEN [] ¬ RefTab.Store[x: registry, key: class.name, val: class];
};
GetRegistered: PUBLIC PROC [name: ATOM] RETURNS [class: PropRegistry.RegistryClass] = {
Return NIL of no RegistryClass of that name exists
IF name#NIL THEN class ¬ NARROW[RefTab.Fetch[registry, name].val];
};
registry: RefTab.Ref = RefTab.Create[mod: 51];
END.