********************************************************************
* NOTE: This file is generated automatically from the event * definition file Match.evt. ********************************************************************<* PRAGMA LL *> MODULE; <*NOWARN*> IMPORT Match, MatchAlgClass, ZeusClass, Zeus; <*NOWARN*> IMPORT MatchViewClass, Algorithm, VBT, View, Thread; <*NOWARN*> IMPORT AlgorithmClass; <* FATAL Zeus.Error, Zeus.Locked *> MatchIE If you get either of these errors, contact a Zeus implementor.TYPE InitArgs = BRANDED REF RECORD clues: Match.Clues; END; SetStateArgs = BRANDED REF RECORD i: INTEGER; j: INTEGER; state: Match.State; END; SelectedArgs = BRANDED REF RECORD key: INTEGER; cd: VBT.MouseRec; 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 | MatchViewClass.T (view) => <*NOWARN*> TYPECASE evt OF | InitArgs(varInitArgs) => <*NOWARN*> view.oeInit ( varInitArgs.clues ) | SetStateArgs(varSetStateArgs) => <*NOWARN*> view.oeSetState ( varSetStateArgs.i , varSetStateArgs.j , varSetStateArgs.state ) ELSE <* ASSERT FALSE *> END; ELSE (* this view isn't a MatchViewClass, so just ignore *) END END OEDispatcher; <*NOWARN*> PROCEDUREFEDispatcher (v: ZeusClass.T; evt: REFANY) = <* LL = VBT.mu *> BEGIN TYPECASE v OF | MatchAlgClass.T (alg) => <*NOWARN*> TYPECASE evt OF | SelectedArgs(varSelectedArgs) => <*NOWARN*> alg.feSelected ( varSelectedArgs.key , varSelectedArgs.cd ) ELSE <* ASSERT FALSE *> END; ELSE (* this alg isn't a MatchAlgClass, so just ignore *) END END FEDispatcher; PROCEDUREInit ( initiator: Algorithm.T; READONLY clues: Match.Clues ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(InitArgs , clues := clues ); alg := NARROW(initiator, MatchAlgClass.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; PROCEDURESetState ( initiator: Algorithm.T; i, j: INTEGER; state: Match.State ) RAISES {Thread.Alerted} = <* LL = {} *> VAR zumeArgRec := NEW(SetStateArgs , i := i , j := j , state := state ); alg := NARROW(initiator, MatchAlgClass.T); BEGIN LOCK alg.evtMu DO INC(alg.eventDataRec.ctOfSetState); alg.stopAtEvent := alg.eventDataRec.stopAtSetState; alg.waitAtEvent := alg.eventDataRec.waitAtSetState; Zeus.Dispatch(initiator, Zeus.EventStyle.Output, 1, "SetState", OEDispatcher, zumeArgRec); END; END SetState; PROCEDURESelected ( initiator: View.T; key: INTEGER; READONLY cd: VBT.MouseRec ) RAISES {Thread.Alerted} = <* LL = VBT.mu *> VAR zumeArgRec := NEW(SelectedArgs , key := key , cd := cd ); BEGIN Zeus.Dispatch(initiator, Zeus.EventStyle.Notify, 1, "Selected", FEDispatcher, zumeArgRec); END Selected; BEGIN END MatchIE.