<> <> <> <> <> <> <> <<(1) Routines for creating routers, e.g. for applications that require a router per window.>> <<(2) Routines for sending text to routers created by this interface (i.e., routers that don't have names).>> <<(3) Duplicate (but renamed) copies of the Append, PutF, Blink, and ClearHerald kept here for backwards compatibility with existing Feedback clients.>> <<(4) Routines for directing routers to specific output areas. Other interfaces contain routines for directing routers to specific classes of output. For instance, at the time of this writing, FeedbackOps.mesa contains routines to direct routers to use various kinds of Cedar Viewers output.>> <<(5) The SIGNAL Problem, which can be used by any application that needs a signal that passes a ROPE but doesn't want to clutter up the world with yet another SIGNAL name.>> <<>> DIRECTORY FeedbackTypes, IO, Rope, SimpleFeedback; Feedback: CEDAR DEFINITIONS = BEGIN <> MsgClass: TYPE = SimpleFeedback.MsgClass; MsgType: TYPE = SimpleFeedback.MsgType; ROPE: TYPE ~ Rope.ROPE; MsgRouter: TYPE = REF MsgRouterObj; MsgRouterObj: TYPE = FeedbackTypes.MsgRouterObj; < breaksToType[b][e]=mt.>> typeBreaksAt: READONLY ARRAY MsgType OF Breaks; Breaks: TYPE ~ RECORD [begin, end: BOOL]; breaksToType: READONLY ARRAY --begin:--BOOL OF ARRAY --end:--BOOL OF MsgType; <> CreateRouter: PROC RETURNS [router: MsgRouter]; <> RegisterRouter: PROC [router: MsgRouter, routerName: ATOM] RETURNS [oldRouter: MsgRouter _ NIL]; <> RouterFromName: PROC [routerName: ATOM] RETURNS [router: MsgRouter]; <> EnsureRouter: PROC [routerName: ATOM] RETURNS [router: MsgRouter]; <> ScanRouters: PROC [foreach: PROC [ATOM, MsgRouter] RETURNS [stop: BOOL _ FALSE]] RETURNS [RouterScanResult]; <> RouterScanResult: TYPE ~ RECORD [stopped: BOOL _ FALSE, atName: ATOM _ NIL, atRouter: MsgRouter _ NIL]; <> <> Append: PROC [router: MsgRouter, msgType: MsgType, msgClass: MsgClass, msg: ROPE]; <> PutF: PROC [router: MsgRouter, msgType: MsgType, msgClass: MsgClass, format: ROPE _ NIL, v1, v2, v3, v4, v5: IO.Value _ [null[]] ]; <> Blink: PROC [router: MsgRouter, msgClass: MsgClass]; <> ClearHerald: PROC [router: MsgRouter, msgClass: MsgClass]; <> SetRouterOn: PROC [router: MsgRouter, on: BOOL]; <> GetRouterOn: PROC [router: MsgRouter] RETURNS [on: BOOL]; <> <> <> <<>> AppendByName: PROC [routerName: ATOM, msgType: MsgType, msgClass: MsgClass, msg: Rope.ROPE]; <> PutFByName: PROC [routerName: ATOM, msgType: MsgType, msgClass: MsgClass, format: Rope.ROPE _ NIL, v1, v2, v3, v4, v5: IO.Value _ [null[]] ]; <> BlinkByName: PROC [routerName: ATOM, msgClass: MsgClass]; <> ClearHeraldByName: PROC [routerName: ATOM, msgClass: MsgClass]; <> <> MsgHandler: TYPE ~ REF MsgHandlerObj; MsgHandlerObj: TYPE; SetHandler: PROC [router: MsgRouter, msgClass: MsgClass, mh: MsgHandler] RETURNS [previous: MsgHandler]; < direct output for the pair (router, msgClass) to the handler mh.>> < remove explicit directions for the pair (router, msgClass).>> < manipulate the default for that router.>> < remove explicit directions for all MsgClasses and manipulate the default for that router.>> SetMultiHandler: PROC [router: MsgRouter, msgClasses: LIST OF MsgClass, mh: MsgHandler]; <> GetHandler: PROC [router: MsgRouter, msgClass: MsgClass] RETURNS [MsgHandler]; <> GetEffectiveHandler: PROC [router: MsgRouter, msgClass: MsgClass] RETURNS [MsgHandler]; <> ScanHandlers: PROC [router: MsgRouter, foreach: PROC [MsgClass, MsgHandler] RETURNS [stop: BOOL _ FALSE]] RETURNS [HandlerScanResult]; <> HandlerScanResult: TYPE ~ RECORD [stopped: BOOL _ FALSE, atClass: MsgClass _ NIL, atHandler: MsgHandler _ NIL]; <> <<>> GetHandledClasses: PROC [MsgRouter] RETURNS [LIST OF MsgClass]; <> <<>> defaultHandler: READONLY Feedback.MsgHandler; <> <<>> SetGlobalDefaultHandlersBehavior: PROC [MsgHandler] RETURNS [previous: MsgHandler]; <> <> <> Problem: READONLY SIGNAL [msg: ROPE]; END.