********************************************************************
* NOTE: This file is generated automatically from the event * definition file logo.evt. ********************************************************************<* PRAGMA LL *> MODULE; <*NOWARN*> IMPORT logoAlgClass, ZeusClass, Zeus, logoViewClass; <*NOWARN*> IMPORT Algorithm, View, Thread, AlgorithmClass; <* FATAL Zeus.Error, Zeus.Locked *> logoIE If you get either of these errors, contact a Zeus implementor.TYPE InitArgs = BRANDED REF RECORD text: TEXT; END; RandomStepArgs = BRANDED REF RECORD delta: REAL; END; ShiftArgs = BRANDED REF RECORD END; MarqueeArgs = BRANDED REF RECORD side: INTEGER; END; MarqueeSpotsArgs = BRANDED REF RECORD END;Zeus calls the following to invoke vbt v's event handler:<*NOWARN*> PROCEDUREOEDispatcher (v: ZeusClass.T; evt: REFANY) RAISES {Thread.Alerted} = <* LL <= VBT.mu *> (* LL = {} if event style is output, LL = VBT.mu if event style is update. *) BEGIN TYPECASE v OF | logoViewClass.T (view) => <*NOWARN*> TYPECASE evt OF | InitArgs(varInitArgs) => <*NOWARN*> view.oeInit ( varInitArgs.text ) | RandomStepArgs(varRandomStepArgs) => <*NOWARN*> view.oeRandomStep ( varRandomStepArgs.delta ) | ShiftArgs(varShiftArgs) => <*NOWARN*> view.oeShift ( ) | MarqueeArgs(varMarqueeArgs) => <*NOWARN*> view.oeMarquee ( varMarqueeArgs.side ) | MarqueeSpotsArgs(varMarqueeSpotsArgs) => <*NOWARN*> view.oeMarqueeSpots ( ) ELSE <* ASSERT FALSE *> END; ELSE (* this view isn't a logoViewClass, so just ignore *) END END OEDispatcher; <*NOWARN*> PROCEDUREFEDispatcher (v: ZeusClass.T; evt: REFANY) = <* LL = VBT.mu *> BEGIN TYPECASE v OF | logoAlgClass.T (alg) => <*NOWARN*> TYPECASE evt OF ELSE <* ASSERT FALSE *> END; ELSE (* this alg isn't a logoAlgClass, so just ignore *) END END FEDispatcher; PROCEDUREInit ( initiator: Algorithm.T; text: TEXT ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(InitArgs , text := text ); alg := NARROW(initiator, logoAlgClass.T); BEGIN LOCK alg.evtMu DO INC(alg.eventDataRec.ctOfInit); alg.stopAtEvent := alg.eventDataRec.stopAtInit; alg.waitAtEvent := alg.eventDataRec.waitAtInit; Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1, "Init", OEDispatcher, zumeArgRec); END; END Init; PROCEDURERandomStep ( initiator: Algorithm.T; delta: REAL ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(RandomStepArgs , delta := delta ); alg := NARROW(initiator, logoAlgClass.T); BEGIN LOCK alg.evtMu DO INC(alg.eventDataRec.ctOfRandomStep); alg.stopAtEvent := alg.eventDataRec.stopAtRandomStep; alg.waitAtEvent := alg.eventDataRec.waitAtRandomStep; Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1, "RandomStep", OEDispatcher, zumeArgRec); END; END RandomStep; PROCEDUREShift ( initiator: Algorithm.T; ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(ShiftArgs ); alg := NARROW(initiator, logoAlgClass.T); BEGIN LOCK alg.evtMu DO INC(alg.eventDataRec.ctOfShift); alg.stopAtEvent := alg.eventDataRec.stopAtShift; alg.waitAtEvent := alg.eventDataRec.waitAtShift; Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1, "Shift", OEDispatcher, zumeArgRec); END; END Shift; PROCEDUREMarquee ( initiator: Algorithm.T; side: INTEGER ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(MarqueeArgs , side := side ); alg := NARROW(initiator, logoAlgClass.T); BEGIN LOCK alg.evtMu DO INC(alg.eventDataRec.ctOfMarquee); alg.stopAtEvent := alg.eventDataRec.stopAtMarquee; alg.waitAtEvent := alg.eventDataRec.waitAtMarquee; Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1, "Marquee", OEDispatcher, zumeArgRec); END; END Marquee; PROCEDUREMarqueeSpots ( initiator: Algorithm.T; ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(MarqueeSpotsArgs ); alg := NARROW(initiator, logoAlgClass.T); BEGIN LOCK alg.evtMu DO INC(alg.eventDataRec.ctOfMarqueeSpots); alg.stopAtEvent := alg.eventDataRec.stopAtMarqueeSpots; alg.waitAtEvent := alg.eventDataRec.waitAtMarqueeSpots; Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1, "MarqueeSpots", OEDispatcher, zumeArgRec); END; END MarqueeSpots; BEGIN END logoIE.