mentor/derived/SubtypeAlgClass.m3


 Copyright (C) 1995, Digital Equipment Corporation.       
 All rights reserved.                                     
 See the file COPYRIGHT for a full description.           
                                                          
 Last modified on Thu Feb  9 08:48:22 PST 1995 by kalsow  
      modified on Wed Feb 17 16:46:18 PST 1993 by johnh   
      modified on Thu Sep 24 10:59:20 PDT 1992 by mhb     

********************************************************************

      *  NOTE: This file is generated automatically from the event
      *        definition file Subtype.evt.
      ********************************************************************


MODULE SubtypeAlgClass;

<*NOWARN*> IMPORT Rd, ZeusClass, Fmt, Algorithm, Wr, ZeusPanel;
<*NOWARN*> IMPORT FormsVBT, AlgSubtype, VBT, Text, ZeusUtil;

<* PRAGMA LL *>
Fix any FormsVBT errors; don't handle exceptions for them.
<* FATAL FormsVBT.Error, FormsVBT.Unimplemented *>

REVEAL
  T = Public BRANDED OBJECT
      OVERRIDES
        <* LL = VBT.mu *>
        init := SubtypeDefaultInit;
        snapshot := SubtypeDefaultSnapshot;
        restore := SubtypeDefaultRestore;
        updateEventCounts := SubtypeDefaultUpdateCts;
      END;

PROCEDURE SubtypeDefaultInit (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("SubtypeEventData.fv");
    Attach("stopatCodeEvents", SubtypeDoIt);
    Attach("waitatCodeEvents", SubtypeDoIt);
    Attach("eventCounts", SubtypeRefreshCts);
    Attach("stopAtSetup", SubtypeDoIt);
    Attach("waitAtSetup", SubtypeDoIt);
    Attach("stopAtBegin", SubtypeDoIt);
    Attach("waitAtBegin", SubtypeDoIt);
    Attach("stopAtNewBot", SubtypeDoIt);
    Attach("waitAtNewBot", SubtypeDoIt);
    Attach("stopAtNewTop", SubtypeDoIt);
    Attach("waitAtNewTop", SubtypeDoIt);
    Attach("stopAtNewFun", SubtypeDoIt);
    Attach("waitAtNewFun", SubtypeDoIt);
    Attach("stopAtNewDomRng", SubtypeDoIt);
    Attach("waitAtNewDomRng", SubtypeDoIt);
    Attach("stopAtNewLoop", SubtypeDoIt);
    Attach("waitAtNewLoop", SubtypeDoIt);
    Attach("stopAtEnter", SubtypeDoIt);
    Attach("waitAtEnter", SubtypeDoIt);
    Attach("stopAtExit", SubtypeDoIt);
    Attach("waitAtExit", SubtypeDoIt);
    Attach("stopAtSeenOK", SubtypeDoIt);
    Attach("waitAtSeenOK", SubtypeDoIt);
    Attach("stopAtNotice", SubtypeDoIt);
    Attach("waitAtNotice", SubtypeDoIt);
    Attach("stopAtBotLessAnyOK", SubtypeDoIt);
    Attach("waitAtBotLessAnyOK", SubtypeDoIt);
    Attach("stopAtTopLessTopOK", SubtypeDoIt);
    Attach("waitAtTopLessTopOK", SubtypeDoIt);
    Attach("stopAtTopLessNonTopKO", SubtypeDoIt);
    Attach("waitAtTopLessNonTopKO", SubtypeDoIt);
    Attach("stopAtFunLessBotKO", SubtypeDoIt);
    Attach("waitAtFunLessBotKO", SubtypeDoIt);
    Attach("stopAtFunLessTopOK", SubtypeDoIt);
    Attach("waitAtFunLessTopOK", SubtypeDoIt);
    Attach("stopAtFunLessFun", SubtypeDoIt);
    Attach("waitAtFunLessFun", SubtypeDoIt);
    Attach("stopAtOK", SubtypeDoIt);
    Attach("waitAtOK", SubtypeDoIt);
    Attach("stopAtKO", SubtypeDoIt);
    Attach("waitAtKO", SubtypeDoIt);
    FromFV (v.eventData, v);    (* Get FV and internal data in sync *)
    RETURN Algorithm.T.init(v);
  END SubtypeDefaultInit;

PROCEDURE SubtypeDoIt (           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, "stopAtSetup") THEN
      NARROW(arg, T).eventDataRec.stopAtSetup :=
          FormsVBT.GetBoolean(fv, "stopAtSetup");
    END;
    IF Text.Equal(e, "waitAtSetup") THEN
      NARROW(arg, T).eventDataRec.waitAtSetup :=
          FormsVBT.GetInteger(fv, "waitAtSetup");
    END;
    IF Text.Equal(e, "stopAtBegin") THEN
      NARROW(arg, T).eventDataRec.stopAtBegin :=
          FormsVBT.GetBoolean(fv, "stopAtBegin");
    END;
    IF Text.Equal(e, "waitAtBegin") THEN
      NARROW(arg, T).eventDataRec.waitAtBegin :=
          FormsVBT.GetInteger(fv, "waitAtBegin");
    END;
    IF Text.Equal(e, "stopAtNewBot") THEN
      NARROW(arg, T).eventDataRec.stopAtNewBot :=
          FormsVBT.GetBoolean(fv, "stopAtNewBot");
    END;
    IF Text.Equal(e, "waitAtNewBot") THEN
      NARROW(arg, T).eventDataRec.waitAtNewBot :=
          FormsVBT.GetInteger(fv, "waitAtNewBot");
    END;
    IF Text.Equal(e, "stopAtNewTop") THEN
      NARROW(arg, T).eventDataRec.stopAtNewTop :=
          FormsVBT.GetBoolean(fv, "stopAtNewTop");
    END;
    IF Text.Equal(e, "waitAtNewTop") THEN
      NARROW(arg, T).eventDataRec.waitAtNewTop :=
          FormsVBT.GetInteger(fv, "waitAtNewTop");
    END;
    IF Text.Equal(e, "stopAtNewFun") THEN
      NARROW(arg, T).eventDataRec.stopAtNewFun :=
          FormsVBT.GetBoolean(fv, "stopAtNewFun");
    END;
    IF Text.Equal(e, "waitAtNewFun") THEN
      NARROW(arg, T).eventDataRec.waitAtNewFun :=
          FormsVBT.GetInteger(fv, "waitAtNewFun");
    END;
    IF Text.Equal(e, "stopAtNewDomRng") THEN
      NARROW(arg, T).eventDataRec.stopAtNewDomRng :=
          FormsVBT.GetBoolean(fv, "stopAtNewDomRng");
    END;
    IF Text.Equal(e, "waitAtNewDomRng") THEN
      NARROW(arg, T).eventDataRec.waitAtNewDomRng :=
          FormsVBT.GetInteger(fv, "waitAtNewDomRng");
    END;
    IF Text.Equal(e, "stopAtNewLoop") THEN
      NARROW(arg, T).eventDataRec.stopAtNewLoop :=
          FormsVBT.GetBoolean(fv, "stopAtNewLoop");
    END;
    IF Text.Equal(e, "waitAtNewLoop") THEN
      NARROW(arg, T).eventDataRec.waitAtNewLoop :=
          FormsVBT.GetInteger(fv, "waitAtNewLoop");
    END;
    IF Text.Equal(e, "stopAtEnter") THEN
      NARROW(arg, T).eventDataRec.stopAtEnter :=
          FormsVBT.GetBoolean(fv, "stopAtEnter");
    END;
    IF Text.Equal(e, "waitAtEnter") THEN
      NARROW(arg, T).eventDataRec.waitAtEnter :=
          FormsVBT.GetInteger(fv, "waitAtEnter");
    END;
    IF Text.Equal(e, "stopAtExit") THEN
      NARROW(arg, T).eventDataRec.stopAtExit :=
          FormsVBT.GetBoolean(fv, "stopAtExit");
    END;
    IF Text.Equal(e, "waitAtExit") THEN
      NARROW(arg, T).eventDataRec.waitAtExit :=
          FormsVBT.GetInteger(fv, "waitAtExit");
    END;
    IF Text.Equal(e, "stopAtSeenOK") THEN
      NARROW(arg, T).eventDataRec.stopAtSeenOK :=
          FormsVBT.GetBoolean(fv, "stopAtSeenOK");
    END;
    IF Text.Equal(e, "waitAtSeenOK") THEN
      NARROW(arg, T).eventDataRec.waitAtSeenOK :=
          FormsVBT.GetInteger(fv, "waitAtSeenOK");
    END;
    IF Text.Equal(e, "stopAtNotice") THEN
      NARROW(arg, T).eventDataRec.stopAtNotice :=
          FormsVBT.GetBoolean(fv, "stopAtNotice");
    END;
    IF Text.Equal(e, "waitAtNotice") THEN
      NARROW(arg, T).eventDataRec.waitAtNotice :=
          FormsVBT.GetInteger(fv, "waitAtNotice");
    END;
    IF Text.Equal(e, "stopAtBotLessAnyOK") THEN
      NARROW(arg, T).eventDataRec.stopAtBotLessAnyOK :=
          FormsVBT.GetBoolean(fv, "stopAtBotLessAnyOK");
    END;
    IF Text.Equal(e, "waitAtBotLessAnyOK") THEN
      NARROW(arg, T).eventDataRec.waitAtBotLessAnyOK :=
          FormsVBT.GetInteger(fv, "waitAtBotLessAnyOK");
    END;
    IF Text.Equal(e, "stopAtTopLessTopOK") THEN
      NARROW(arg, T).eventDataRec.stopAtTopLessTopOK :=
          FormsVBT.GetBoolean(fv, "stopAtTopLessTopOK");
    END;
    IF Text.Equal(e, "waitAtTopLessTopOK") THEN
      NARROW(arg, T).eventDataRec.waitAtTopLessTopOK :=
          FormsVBT.GetInteger(fv, "waitAtTopLessTopOK");
    END;
    IF Text.Equal(e, "stopAtTopLessNonTopKO") THEN
      NARROW(arg, T).eventDataRec.stopAtTopLessNonTopKO :=
          FormsVBT.GetBoolean(fv, "stopAtTopLessNonTopKO");
    END;
    IF Text.Equal(e, "waitAtTopLessNonTopKO") THEN
      NARROW(arg, T).eventDataRec.waitAtTopLessNonTopKO :=
          FormsVBT.GetInteger(fv, "waitAtTopLessNonTopKO");
    END;
    IF Text.Equal(e, "stopAtFunLessBotKO") THEN
      NARROW(arg, T).eventDataRec.stopAtFunLessBotKO :=
          FormsVBT.GetBoolean(fv, "stopAtFunLessBotKO");
    END;
    IF Text.Equal(e, "waitAtFunLessBotKO") THEN
      NARROW(arg, T).eventDataRec.waitAtFunLessBotKO :=
          FormsVBT.GetInteger(fv, "waitAtFunLessBotKO");
    END;
    IF Text.Equal(e, "stopAtFunLessTopOK") THEN
      NARROW(arg, T).eventDataRec.stopAtFunLessTopOK :=
          FormsVBT.GetBoolean(fv, "stopAtFunLessTopOK");
    END;
    IF Text.Equal(e, "waitAtFunLessTopOK") THEN
      NARROW(arg, T).eventDataRec.waitAtFunLessTopOK :=
          FormsVBT.GetInteger(fv, "waitAtFunLessTopOK");
    END;
    IF Text.Equal(e, "stopAtFunLessFun") THEN
      NARROW(arg, T).eventDataRec.stopAtFunLessFun :=
          FormsVBT.GetBoolean(fv, "stopAtFunLessFun");
    END;
    IF Text.Equal(e, "waitAtFunLessFun") THEN
      NARROW(arg, T).eventDataRec.waitAtFunLessFun :=
          FormsVBT.GetInteger(fv, "waitAtFunLessFun");
    END;
    IF Text.Equal(e, "stopAtOK") THEN
      NARROW(arg, T).eventDataRec.stopAtOK :=
          FormsVBT.GetBoolean(fv, "stopAtOK");
    END;
    IF Text.Equal(e, "waitAtOK") THEN
      NARROW(arg, T).eventDataRec.waitAtOK :=
          FormsVBT.GetInteger(fv, "waitAtOK");
    END;
    IF Text.Equal(e, "stopAtKO") THEN
      NARROW(arg, T).eventDataRec.stopAtKO :=
          FormsVBT.GetBoolean(fv, "stopAtKO");
    END;
    IF Text.Equal(e, "waitAtKO") THEN
      NARROW(arg, T).eventDataRec.waitAtKO :=
          FormsVBT.GetInteger(fv, "waitAtKO");
    END;
  END SubtypeDoIt;

PROCEDURE SubtypeRefreshCts (
                <*UNUSED*> fv  : FormsVBT.T;
                <*UNUSED*> e   : TEXT;
                           arg : REFANY;
                <*UNUSED*> t   : VBT.TimeStamp) =
  <* LL = VBT.mu *>
  BEGIN
    NARROW(arg, T).updateEventCounts(FALSE);
  END SubtypeRefreshCts;

PROCEDURE FromFV (fv : FormsVBT.T; alg: T) =
  <* LL = VBT.mu *>
  BEGIN
    alg.stopatCodeEvents :=
        FormsVBT.GetBoolean(fv, "stopatCodeEvents");
    alg.waitatCodeEvents :=
        FormsVBT.GetInteger(fv, "waitatCodeEvents");
    alg.eventDataRec.stopAtSetup :=
        FormsVBT.GetBoolean(fv, "stopAtSetup");
    alg.eventDataRec.waitAtSetup :=
        FormsVBT.GetInteger(fv, "waitAtSetup");
    alg.eventDataRec.stopAtBegin :=
        FormsVBT.GetBoolean(fv, "stopAtBegin");
    alg.eventDataRec.waitAtBegin :=
        FormsVBT.GetInteger(fv, "waitAtBegin");
    alg.eventDataRec.stopAtNewBot :=
        FormsVBT.GetBoolean(fv, "stopAtNewBot");
    alg.eventDataRec.waitAtNewBot :=
        FormsVBT.GetInteger(fv, "waitAtNewBot");
    alg.eventDataRec.stopAtNewTop :=
        FormsVBT.GetBoolean(fv, "stopAtNewTop");
    alg.eventDataRec.waitAtNewTop :=
        FormsVBT.GetInteger(fv, "waitAtNewTop");
    alg.eventDataRec.stopAtNewFun :=
        FormsVBT.GetBoolean(fv, "stopAtNewFun");
    alg.eventDataRec.waitAtNewFun :=
        FormsVBT.GetInteger(fv, "waitAtNewFun");
    alg.eventDataRec.stopAtNewDomRng :=
        FormsVBT.GetBoolean(fv, "stopAtNewDomRng");
    alg.eventDataRec.waitAtNewDomRng :=
        FormsVBT.GetInteger(fv, "waitAtNewDomRng");
    alg.eventDataRec.stopAtNewLoop :=
        FormsVBT.GetBoolean(fv, "stopAtNewLoop");
    alg.eventDataRec.waitAtNewLoop :=
        FormsVBT.GetInteger(fv, "waitAtNewLoop");
    alg.eventDataRec.stopAtEnter :=
        FormsVBT.GetBoolean(fv, "stopAtEnter");
    alg.eventDataRec.waitAtEnter :=
        FormsVBT.GetInteger(fv, "waitAtEnter");
    alg.eventDataRec.stopAtExit :=
        FormsVBT.GetBoolean(fv, "stopAtExit");
    alg.eventDataRec.waitAtExit :=
        FormsVBT.GetInteger(fv, "waitAtExit");
    alg.eventDataRec.stopAtSeenOK :=
        FormsVBT.GetBoolean(fv, "stopAtSeenOK");
    alg.eventDataRec.waitAtSeenOK :=
        FormsVBT.GetInteger(fv, "waitAtSeenOK");
    alg.eventDataRec.stopAtNotice :=
        FormsVBT.GetBoolean(fv, "stopAtNotice");
    alg.eventDataRec.waitAtNotice :=
        FormsVBT.GetInteger(fv, "waitAtNotice");
    alg.eventDataRec.stopAtBotLessAnyOK :=
        FormsVBT.GetBoolean(fv, "stopAtBotLessAnyOK");
    alg.eventDataRec.waitAtBotLessAnyOK :=
        FormsVBT.GetInteger(fv, "waitAtBotLessAnyOK");
    alg.eventDataRec.stopAtTopLessTopOK :=
        FormsVBT.GetBoolean(fv, "stopAtTopLessTopOK");
    alg.eventDataRec.waitAtTopLessTopOK :=
        FormsVBT.GetInteger(fv, "waitAtTopLessTopOK");
    alg.eventDataRec.stopAtTopLessNonTopKO :=
        FormsVBT.GetBoolean(fv, "stopAtTopLessNonTopKO");
    alg.eventDataRec.waitAtTopLessNonTopKO :=
        FormsVBT.GetInteger(fv, "waitAtTopLessNonTopKO");
    alg.eventDataRec.stopAtFunLessBotKO :=
        FormsVBT.GetBoolean(fv, "stopAtFunLessBotKO");
    alg.eventDataRec.waitAtFunLessBotKO :=
        FormsVBT.GetInteger(fv, "waitAtFunLessBotKO");
    alg.eventDataRec.stopAtFunLessTopOK :=
        FormsVBT.GetBoolean(fv, "stopAtFunLessTopOK");
    alg.eventDataRec.waitAtFunLessTopOK :=
        FormsVBT.GetInteger(fv, "waitAtFunLessTopOK");
    alg.eventDataRec.stopAtFunLessFun :=
        FormsVBT.GetBoolean(fv, "stopAtFunLessFun");
    alg.eventDataRec.waitAtFunLessFun :=
        FormsVBT.GetInteger(fv, "waitAtFunLessFun");
    alg.eventDataRec.stopAtOK :=
        FormsVBT.GetBoolean(fv, "stopAtOK");
    alg.eventDataRec.waitAtOK :=
        FormsVBT.GetInteger(fv, "waitAtOK");
    alg.eventDataRec.stopAtKO :=
        FormsVBT.GetBoolean(fv, "stopAtKO");
    alg.eventDataRec.waitAtKO :=
        FormsVBT.GetInteger(fv, "waitAtKO");
  END FromFV;

<*UNUSED*>
PROCEDURE ToFV (fv : FormsVBT.T; alg: T) =
  <* LL = VBT.mu *>
  BEGIN
    FormsVBT.PutBoolean(fv, "stopatCodeEvents", alg.stopatCodeEvents);
    FormsVBT.PutInteger(fv, "waitatCodeEvents", alg.waitatCodeEvents);
    FormsVBT.PutBoolean(fv, "stopAtSetup",
                        alg.eventDataRec.stopAtSetup);
    FormsVBT.PutInteger(fv, "waitAtSetup",
                        alg.eventDataRec.waitAtSetup);
    FormsVBT.PutBoolean(fv, "stopAtBegin",
                        alg.eventDataRec.stopAtBegin);
    FormsVBT.PutInteger(fv, "waitAtBegin",
                        alg.eventDataRec.waitAtBegin);
    FormsVBT.PutBoolean(fv, "stopAtNewBot",
                        alg.eventDataRec.stopAtNewBot);
    FormsVBT.PutInteger(fv, "waitAtNewBot",
                        alg.eventDataRec.waitAtNewBot);
    FormsVBT.PutBoolean(fv, "stopAtNewTop",
                        alg.eventDataRec.stopAtNewTop);
    FormsVBT.PutInteger(fv, "waitAtNewTop",
                        alg.eventDataRec.waitAtNewTop);
    FormsVBT.PutBoolean(fv, "stopAtNewFun",
                        alg.eventDataRec.stopAtNewFun);
    FormsVBT.PutInteger(fv, "waitAtNewFun",
                        alg.eventDataRec.waitAtNewFun);
    FormsVBT.PutBoolean(fv, "stopAtNewDomRng",
                        alg.eventDataRec.stopAtNewDomRng);
    FormsVBT.PutInteger(fv, "waitAtNewDomRng",
                        alg.eventDataRec.waitAtNewDomRng);
    FormsVBT.PutBoolean(fv, "stopAtNewLoop",
                        alg.eventDataRec.stopAtNewLoop);
    FormsVBT.PutInteger(fv, "waitAtNewLoop",
                        alg.eventDataRec.waitAtNewLoop);
    FormsVBT.PutBoolean(fv, "stopAtEnter",
                        alg.eventDataRec.stopAtEnter);
    FormsVBT.PutInteger(fv, "waitAtEnter",
                        alg.eventDataRec.waitAtEnter);
    FormsVBT.PutBoolean(fv, "stopAtExit",
                        alg.eventDataRec.stopAtExit);
    FormsVBT.PutInteger(fv, "waitAtExit",
                        alg.eventDataRec.waitAtExit);
    FormsVBT.PutBoolean(fv, "stopAtSeenOK",
                        alg.eventDataRec.stopAtSeenOK);
    FormsVBT.PutInteger(fv, "waitAtSeenOK",
                        alg.eventDataRec.waitAtSeenOK);
    FormsVBT.PutBoolean(fv, "stopAtNotice",
                        alg.eventDataRec.stopAtNotice);
    FormsVBT.PutInteger(fv, "waitAtNotice",
                        alg.eventDataRec.waitAtNotice);
    FormsVBT.PutBoolean(fv, "stopAtBotLessAnyOK",
                        alg.eventDataRec.stopAtBotLessAnyOK);
    FormsVBT.PutInteger(fv, "waitAtBotLessAnyOK",
                        alg.eventDataRec.waitAtBotLessAnyOK);
    FormsVBT.PutBoolean(fv, "stopAtTopLessTopOK",
                        alg.eventDataRec.stopAtTopLessTopOK);
    FormsVBT.PutInteger(fv, "waitAtTopLessTopOK",
                        alg.eventDataRec.waitAtTopLessTopOK);
    FormsVBT.PutBoolean(fv, "stopAtTopLessNonTopKO",
                        alg.eventDataRec.stopAtTopLessNonTopKO);
    FormsVBT.PutInteger(fv, "waitAtTopLessNonTopKO",
                        alg.eventDataRec.waitAtTopLessNonTopKO);
    FormsVBT.PutBoolean(fv, "stopAtFunLessBotKO",
                        alg.eventDataRec.stopAtFunLessBotKO);
    FormsVBT.PutInteger(fv, "waitAtFunLessBotKO",
                        alg.eventDataRec.waitAtFunLessBotKO);
    FormsVBT.PutBoolean(fv, "stopAtFunLessTopOK",
                        alg.eventDataRec.stopAtFunLessTopOK);
    FormsVBT.PutInteger(fv, "waitAtFunLessTopOK",
                        alg.eventDataRec.waitAtFunLessTopOK);
    FormsVBT.PutBoolean(fv, "stopAtFunLessFun",
                        alg.eventDataRec.stopAtFunLessFun);
    FormsVBT.PutInteger(fv, "waitAtFunLessFun",
                        alg.eventDataRec.waitAtFunLessFun);
    FormsVBT.PutBoolean(fv, "stopAtOK",
                        alg.eventDataRec.stopAtOK);
    FormsVBT.PutInteger(fv, "waitAtOK",
                        alg.eventDataRec.waitAtOK);
    FormsVBT.PutBoolean(fv, "stopAtKO",
                        alg.eventDataRec.stopAtKO);
    FormsVBT.PutInteger(fv, "waitAtKO",
                        alg.eventDataRec.waitAtKO);
    CountsToFV (fv, alg);
  END ToFV;

PROCEDURE CountsToFV (fv : FormsVBT.T; alg: T) =
  <* LL = VBT.mu *>
  BEGIN
    FormsVBT.PutText(fv, "ctOfSetup",
                        Fmt.Int(alg.eventDataRec.ctOfSetup));
    FormsVBT.PutText(fv, "ctOfBegin",
                        Fmt.Int(alg.eventDataRec.ctOfBegin));
    FormsVBT.PutText(fv, "ctOfNewBot",
                        Fmt.Int(alg.eventDataRec.ctOfNewBot));
    FormsVBT.PutText(fv, "ctOfNewTop",
                        Fmt.Int(alg.eventDataRec.ctOfNewTop));
    FormsVBT.PutText(fv, "ctOfNewFun",
                        Fmt.Int(alg.eventDataRec.ctOfNewFun));
    FormsVBT.PutText(fv, "ctOfNewDomRng",
                        Fmt.Int(alg.eventDataRec.ctOfNewDomRng));
    FormsVBT.PutText(fv, "ctOfNewLoop",
                        Fmt.Int(alg.eventDataRec.ctOfNewLoop));
    FormsVBT.PutText(fv, "ctOfEnter",
                        Fmt.Int(alg.eventDataRec.ctOfEnter));
    FormsVBT.PutText(fv, "ctOfExit",
                        Fmt.Int(alg.eventDataRec.ctOfExit));
    FormsVBT.PutText(fv, "ctOfSeenOK",
                        Fmt.Int(alg.eventDataRec.ctOfSeenOK));
    FormsVBT.PutText(fv, "ctOfNotice",
                        Fmt.Int(alg.eventDataRec.ctOfNotice));
    FormsVBT.PutText(fv, "ctOfBotLessAnyOK",
                        Fmt.Int(alg.eventDataRec.ctOfBotLessAnyOK));
    FormsVBT.PutText(fv, "ctOfTopLessTopOK",
                        Fmt.Int(alg.eventDataRec.ctOfTopLessTopOK));
    FormsVBT.PutText(fv, "ctOfTopLessNonTopKO",
                        Fmt.Int(alg.eventDataRec.ctOfTopLessNonTopKO));
    FormsVBT.PutText(fv, "ctOfFunLessBotKO",
                        Fmt.Int(alg.eventDataRec.ctOfFunLessBotKO));
    FormsVBT.PutText(fv, "ctOfFunLessTopOK",
                        Fmt.Int(alg.eventDataRec.ctOfFunLessTopOK));
    FormsVBT.PutText(fv, "ctOfFunLessFun",
                        Fmt.Int(alg.eventDataRec.ctOfFunLessFun));
    FormsVBT.PutText(fv, "ctOfOK",
                        Fmt.Int(alg.eventDataRec.ctOfOK));
    FormsVBT.PutText(fv, "ctOfKO",
                        Fmt.Int(alg.eventDataRec.ctOfKO));
  END CountsToFV;

PROCEDURE SubtypeDefaultUpdateCts ( v: T; reset: BOOLEAN) =
  <* LL = VBT.mu *>
  BEGIN
    IF reset THEN
      v.eventDataRec.ctOfSetup := 0;
      v.eventDataRec.ctOfBegin := 0;
      v.eventDataRec.ctOfNewBot := 0;
      v.eventDataRec.ctOfNewTop := 0;
      v.eventDataRec.ctOfNewFun := 0;
      v.eventDataRec.ctOfNewDomRng := 0;
      v.eventDataRec.ctOfNewLoop := 0;
      v.eventDataRec.ctOfEnter := 0;
      v.eventDataRec.ctOfExit := 0;
      v.eventDataRec.ctOfSeenOK := 0;
      v.eventDataRec.ctOfNotice := 0;
      v.eventDataRec.ctOfBotLessAnyOK := 0;
      v.eventDataRec.ctOfTopLessTopOK := 0;
      v.eventDataRec.ctOfTopLessNonTopKO := 0;
      v.eventDataRec.ctOfFunLessBotKO := 0;
      v.eventDataRec.ctOfFunLessTopOK := 0;
      v.eventDataRec.ctOfFunLessFun := 0;
      v.eventDataRec.ctOfOK := 0;
      v.eventDataRec.ctOfKO := 0;
    END;
    CountsToFV (v.eventData, v);
  END SubtypeDefaultUpdateCts;

PROCEDURE SubtypeDefaultSnapshot (v: T; wr: Wr.T)
  RAISES {ZeusClass.Error} =
  <* LL = VBT.mu *>
  BEGIN
    TRY
      Wr.PutChar(wr, '(')
    EXCEPT
    ELSE
      RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultSnapshot write error");
    END;
    IF v.eventData = NIL THEN
      RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultSnapshot: " &
          "eventData not set!");
    END;
    TRY
      v.eventData.snapshot(wr)
    EXCEPT
      FormsVBT.Error (msg) =>
        RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultSnapshot FV error: "
          & msg);
    ELSE
      RAISE ZeusClass.Error(
        "SubtypeAlgClass.SubtypeDefaultSnapshot error");
    END;
    Algorithm.T.snapshot(v, wr);
    TRY
      Wr.PutChar(wr, ')')
    EXCEPT
    ELSE
      RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultSnapshot write error");
    END;
  END SubtypeDefaultSnapshot;

PROCEDURE SubtypeDefaultRestore (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(
          "SubtypeAlgClass.SubtypeDefaultRestore read error");
    END;
    IF v.eventData = NIL THEN
      RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultRestore: " &
          "eventData not set!");
    END;
    TRY
      v.eventData.restore(rd);
      v.updateEventCounts(FALSE);
      FromFV(v.eventData, v);
    EXCEPT
    ELSE
      RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultRestore error");
    END;
    Algorithm.T.restore(v, rd);
    IF NOT ZeusUtil.EatChar(rd, ')') THEN
      RAISE ZeusClass.Error(
          "SubtypeAlgClass.SubtypeDefaultRestore read error");
    END;
  END SubtypeDefaultRestore;

BEGIN
END SubtypeAlgClass.