********************************************************************
* NOTE: This file is generated automatically from the event * definition file ZPaper.evt. ********************************************************************MODULEFix any FormsVBT errors; don't handle exceptions for them.; <*NOWARN*> IMPORT Rd, ZeusClass, Fmt, Algorithm, Wr, ZeusPanel; <*NOWARN*> IMPORT FormsVBT, VBT, Text, ZeusUtil; <* PRAGMA LL *> ZPaperAlgClass <* FATAL FormsVBT.Error, FormsVBT.Unimplemented *> REVEAL T = Public BRANDED OBJECT OVERRIDES <* LL = VBT.mu *> init := ZPaperDefaultInit; snapshot := ZPaperDefaultSnapshot; restore := ZPaperDefaultRestore; updateEventCounts := ZPaperDefaultUpdateCts; END; PROCEDUREZPaperDefaultInit (v: T): Algorithm.T = <* LL = VBT.mu *> PROCEDURE Attach (id: TEXT; proc: FormsVBT.Proc) = BEGIN FormsVBT.AttachProc(v.eventData, id, proc, v); END Attach; BEGIN v.eventData := ZeusPanel.NewForm("ZPaperEventData.fv"); Attach("stopatCodeEvents", ZPaperDoIt); Attach("waitatCodeEvents", ZPaperDoIt); Attach("eventCounts", ZPaperRefreshCts); Attach("stopAtInit", ZPaperDoIt); Attach("waitAtInit", ZPaperDoIt); Attach("stopAtSet", ZPaperDoIt); Attach("waitAtSet", ZPaperDoIt); FromFV (v.eventData, v); (* Get FV and internal data in sync *) RETURN Algorithm.T.init(v); END ZPaperDefaultInit; PROCEDUREZPaperDoIt ( fv : FormsVBT.T; e : TEXT; arg: REFANY; <*UNUSED*> t : VBT.TimeStamp) = <* LL = VBT.mu *> BEGIN IF Text.Equal(e, "stopatCodeEvents") THEN NARROW(arg, T).stopatCodeEvents := FormsVBT.GetBoolean(fv, "stopatCodeEvents"); END; IF Text.Equal(e, "waitatCodeEvents") THEN NARROW(arg, T).waitatCodeEvents := FormsVBT.GetInteger(fv, "waitatCodeEvents"); END; IF Text.Equal(e, "stopAtInit") THEN NARROW(arg, T).eventDataRec.stopAtInit := FormsVBT.GetBoolean(fv, "stopAtInit"); END; IF Text.Equal(e, "waitAtInit") THEN NARROW(arg, T).eventDataRec.waitAtInit := FormsVBT.GetInteger(fv, "waitAtInit"); END; IF Text.Equal(e, "stopAtSet") THEN NARROW(arg, T).eventDataRec.stopAtSet := FormsVBT.GetBoolean(fv, "stopAtSet"); END; IF Text.Equal(e, "waitAtSet") THEN NARROW(arg, T).eventDataRec.waitAtSet := FormsVBT.GetInteger(fv, "waitAtSet"); END; END ZPaperDoIt; PROCEDUREZPaperRefreshCts ( <*UNUSED*> fv : FormsVBT.T; <*UNUSED*> e : TEXT; arg : REFANY; <*UNUSED*> t : VBT.TimeStamp) = <* LL = VBT.mu *> BEGIN NARROW(arg, T).updateEventCounts(FALSE); END ZPaperRefreshCts; PROCEDUREFromFV (fv : FormsVBT.T; alg: T) = <* LL = VBT.mu *> BEGIN alg.stopatCodeEvents := FormsVBT.GetBoolean(fv, "stopatCodeEvents"); alg.waitatCodeEvents := FormsVBT.GetInteger(fv, "waitatCodeEvents"); alg.eventDataRec.stopAtInit := FormsVBT.GetBoolean(fv, "stopAtInit"); alg.eventDataRec.waitAtInit := FormsVBT.GetInteger(fv, "waitAtInit"); alg.eventDataRec.stopAtSet := FormsVBT.GetBoolean(fv, "stopAtSet"); alg.eventDataRec.waitAtSet := FormsVBT.GetInteger(fv, "waitAtSet"); END FromFV; <*UNUSED*> PROCEDUREToFV (fv : FormsVBT.T; alg: T) = <* LL = VBT.mu *> BEGIN FormsVBT.PutBoolean(fv, "stopatCodeEvents", alg.stopatCodeEvents); FormsVBT.PutInteger(fv, "waitatCodeEvents", alg.waitatCodeEvents); FormsVBT.PutBoolean(fv, "stopAtInit", alg.eventDataRec.stopAtInit); FormsVBT.PutInteger(fv, "waitAtInit", alg.eventDataRec.waitAtInit); FormsVBT.PutBoolean(fv, "stopAtSet", alg.eventDataRec.stopAtSet); FormsVBT.PutInteger(fv, "waitAtSet", alg.eventDataRec.waitAtSet); CountsToFV (fv, alg); END ToFV; PROCEDURECountsToFV (fv : FormsVBT.T; alg: T) = <* LL = VBT.mu *> BEGIN FormsVBT.PutText(fv, "ctOfInit", Fmt.Int(alg.eventDataRec.ctOfInit)); FormsVBT.PutText(fv, "ctOfSet", Fmt.Int(alg.eventDataRec.ctOfSet)); END CountsToFV; PROCEDUREZPaperDefaultUpdateCts ( v: T; reset: BOOLEAN) = <* LL = VBT.mu *> BEGIN IF reset THEN v.eventDataRec.ctOfInit := 0; v.eventDataRec.ctOfSet := 0; END; CountsToFV (v.eventData, v); END ZPaperDefaultUpdateCts; PROCEDUREZPaperDefaultSnapshot (v: T; wr: Wr.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TRY Wr.PutChar(wr, '(') EXCEPT ELSE RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultSnapshot write error"); END; IF v.eventData = NIL THEN RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultSnapshot: " & "eventData not set!"); END; TRY v.eventData.snapshot(wr) EXCEPT FormsVBT.Error (msg) => RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultSnapshot FV error: " & msg); ELSE RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultSnapshot error"); END; Algorithm.T.snapshot(v, wr); TRY Wr.PutChar(wr, ')') EXCEPT ELSE RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultSnapshot write error"); END; END ZPaperDefaultSnapshot; PROCEDUREZPaperDefaultRestore (v: T; rd: Rd.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN IF rd = NIL THEN RETURN END; IF NOT ZeusUtil.EatChar(rd, '(') THEN RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultRestore read error"); END; IF v.eventData = NIL THEN RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultRestore: " & "eventData not set!"); END; TRY v.eventData.restore(rd); v.updateEventCounts(FALSE); FromFV(v.eventData, v); EXCEPT ELSE RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultRestore error"); END; Algorithm.T.restore(v, rd); IF NOT ZeusUtil.EatChar(rd, ')') THEN RAISE ZeusClass.Error( "ZPaperAlgClass.ZPaperDefaultRestore read error"); END; END ZPaperDefaultRestore; BEGIN END ZPaperAlgClass.