Oberon || Library || Module Index || Search Engine || Definition || Module
TYPE LoadProc = PROCEDURE (module: ARRAY OF CHAR; errors: RelatedEvents.Object) : BOOLEAN; TYPE LoadServiceProc = PROCEDURE (service, for: ARRAY OF CHAR; errors: RelatedEvents.Object) : BOOLEAN; TYPE Interface = POINTER TO InterfaceRec; TYPE InterfaceRec = RECORD load: LoadProc; loadService: LoadServiceProc; END;
CONST noInterface = 0; CONST moduleNotLoaded = 1; CONST servicesNotSupported = 2; CONST serviceNotLoaded = 3; CONST errorcodes = 4; TYPE ErrorEvent = POINTER TO ErrorEventRec; TYPE ErrorEventRec = RECORD (Events.EventRec) errorcode: SHORTINT; module: Events.Message; (* module or service name *) for: Events.Message; (* type name for serviceNotLoaded *) END; VAR errormsg: ARRAY errorcodes OF Events.Message; VAR error: Events.EventType;
PROCEDURE SetInterface(if: Interface);
PROCEDURE Load(module: ARRAY OF CHAR; errors: RelatedEvents.Object) : BOOLEAN; PROCEDURE LoadService(service, for: ARRAY OF CHAR; errors: RelatedEvents.Object) : BOOLEAN;
SetInterface should be called during the initialization of the module which performs load operations. The load procedure component is expected to meet the specification of Load. The interface procedure loadService is optional and may be set to NIL.
Load tries to load and initialize the given module. LoadService tries to locate a module which offers the given service (see Services) for the type named for, and, if successful, to load it.
Note that Loader calls Services.InitLoader during its initialization.
Oberon || Library || Module Index || Search Engine || Definition || Module