mentor/derived/HullAlgClass.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 Hull.evt.
      ********************************************************************


MODULE HullAlgClass;

<*NOWARN*> IMPORT HullFmt, Rd, ZeusClass, IntList, Fmt, Algorithm;
<*NOWARN*> IMPORT SiteList, Wr, ZeusPanel, FormsVBT, Text, VBT;
<*NOWARN*> IMPORT 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 := HullDefaultInit;
        snapshot := HullDefaultSnapshot;
        restore := HullDefaultRestore;
        updateEventCounts := HullDefaultUpdateCts;
      END;

PROCEDURE HullDefaultInit (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("HullEventData.fv");
    Attach("stopatCodeEvents", HullDoIt);
    Attach("waitatCodeEvents", HullDoIt);
    Attach("eventCounts", HullRefreshCts);
    Attach("stopAtSetup", HullDoIt);
    Attach("waitAtSetup", HullDoIt);
    Attach("stopAtSetHalfPlane", HullDoIt);
    Attach("waitAtSetHalfPlane", HullDoIt);
    Attach("stopAtClearHead", HullDoIt);
    Attach("waitAtClearHead", HullDoIt);
    Attach("stopAtTestSite", HullDoIt);
    Attach("waitAtTestSite", HullDoIt);
    Attach("stopAtClearTest", HullDoIt);
    Attach("waitAtClearTest", HullDoIt);
    Attach("stopAtSetTail", HullDoIt);
    Attach("waitAtSetTail", HullDoIt);
    Attach("stopAtClearTail", HullDoIt);
    Attach("waitAtClearTail", HullDoIt);
    Attach("stopAtMoveHalfPlane", HullDoIt);
    Attach("waitAtMoveHalfPlane", HullDoIt);
    Attach("stopAtConfirm", HullDoIt);
    Attach("waitAtConfirm", HullDoIt);
    Attach("stopAtDeny", HullDoIt);
    Attach("waitAtDeny", HullDoIt);
    Attach("stopAtSwap", HullDoIt);
    Attach("waitAtSwap", HullDoIt);
    Attach("stopAtSentinel", HullDoIt);
    Attach("waitAtSentinel", HullDoIt);
    Attach("stopAtReOrder", HullDoIt);
    Attach("waitAtReOrder", HullDoIt);
    Attach("stopAtStretch", HullDoIt);
    Attach("waitAtStretch", HullDoIt);
    Attach("stopAtSnap", HullDoIt);
    Attach("waitAtSnap", HullDoIt);
    Attach("stopAtShuffle", HullDoIt);
    Attach("waitAtShuffle", HullDoIt);
    FromFV (v.eventData, v);    (* Get FV and internal data in sync *)
    RETURN Algorithm.T.init(v);
  END HullDefaultInit;

PROCEDURE HullDoIt (           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, "stopAtSetHalfPlane") THEN
      NARROW(arg, T).eventDataRec.stopAtSetHalfPlane :=
          FormsVBT.GetBoolean(fv, "stopAtSetHalfPlane");
    END;
    IF Text.Equal(e, "waitAtSetHalfPlane") THEN
      NARROW(arg, T).eventDataRec.waitAtSetHalfPlane :=
          FormsVBT.GetInteger(fv, "waitAtSetHalfPlane");
    END;
    IF Text.Equal(e, "stopAtClearHead") THEN
      NARROW(arg, T).eventDataRec.stopAtClearHead :=
          FormsVBT.GetBoolean(fv, "stopAtClearHead");
    END;
    IF Text.Equal(e, "waitAtClearHead") THEN
      NARROW(arg, T).eventDataRec.waitAtClearHead :=
          FormsVBT.GetInteger(fv, "waitAtClearHead");
    END;
    IF Text.Equal(e, "stopAtTestSite") THEN
      NARROW(arg, T).eventDataRec.stopAtTestSite :=
          FormsVBT.GetBoolean(fv, "stopAtTestSite");
    END;
    IF Text.Equal(e, "waitAtTestSite") THEN
      NARROW(arg, T).eventDataRec.waitAtTestSite :=
          FormsVBT.GetInteger(fv, "waitAtTestSite");
    END;
    IF Text.Equal(e, "stopAtClearTest") THEN
      NARROW(arg, T).eventDataRec.stopAtClearTest :=
          FormsVBT.GetBoolean(fv, "stopAtClearTest");
    END;
    IF Text.Equal(e, "waitAtClearTest") THEN
      NARROW(arg, T).eventDataRec.waitAtClearTest :=
          FormsVBT.GetInteger(fv, "waitAtClearTest");
    END;
    IF Text.Equal(e, "stopAtSetTail") THEN
      NARROW(arg, T).eventDataRec.stopAtSetTail :=
          FormsVBT.GetBoolean(fv, "stopAtSetTail");
    END;
    IF Text.Equal(e, "waitAtSetTail") THEN
      NARROW(arg, T).eventDataRec.waitAtSetTail :=
          FormsVBT.GetInteger(fv, "waitAtSetTail");
    END;
    IF Text.Equal(e, "stopAtClearTail") THEN
      NARROW(arg, T).eventDataRec.stopAtClearTail :=
          FormsVBT.GetBoolean(fv, "stopAtClearTail");
    END;
    IF Text.Equal(e, "waitAtClearTail") THEN
      NARROW(arg, T).eventDataRec.waitAtClearTail :=
          FormsVBT.GetInteger(fv, "waitAtClearTail");
    END;
    IF Text.Equal(e, "stopAtMoveHalfPlane") THEN
      NARROW(arg, T).eventDataRec.stopAtMoveHalfPlane :=
          FormsVBT.GetBoolean(fv, "stopAtMoveHalfPlane");
    END;
    IF Text.Equal(e, "waitAtMoveHalfPlane") THEN
      NARROW(arg, T).eventDataRec.waitAtMoveHalfPlane :=
          FormsVBT.GetInteger(fv, "waitAtMoveHalfPlane");
    END;
    IF Text.Equal(e, "stopAtConfirm") THEN
      NARROW(arg, T).eventDataRec.stopAtConfirm :=
          FormsVBT.GetBoolean(fv, "stopAtConfirm");
    END;
    IF Text.Equal(e, "waitAtConfirm") THEN
      NARROW(arg, T).eventDataRec.waitAtConfirm :=
          FormsVBT.GetInteger(fv, "waitAtConfirm");
    END;
    IF Text.Equal(e, "stopAtDeny") THEN
      NARROW(arg, T).eventDataRec.stopAtDeny :=
          FormsVBT.GetBoolean(fv, "stopAtDeny");
    END;
    IF Text.Equal(e, "waitAtDeny") THEN
      NARROW(arg, T).eventDataRec.waitAtDeny :=
          FormsVBT.GetInteger(fv, "waitAtDeny");
    END;
    IF Text.Equal(e, "stopAtSwap") THEN
      NARROW(arg, T).eventDataRec.stopAtSwap :=
          FormsVBT.GetBoolean(fv, "stopAtSwap");
    END;
    IF Text.Equal(e, "waitAtSwap") THEN
      NARROW(arg, T).eventDataRec.waitAtSwap :=
          FormsVBT.GetInteger(fv, "waitAtSwap");
    END;
    IF Text.Equal(e, "stopAtSentinel") THEN
      NARROW(arg, T).eventDataRec.stopAtSentinel :=
          FormsVBT.GetBoolean(fv, "stopAtSentinel");
    END;
    IF Text.Equal(e, "waitAtSentinel") THEN
      NARROW(arg, T).eventDataRec.waitAtSentinel :=
          FormsVBT.GetInteger(fv, "waitAtSentinel");
    END;
    IF Text.Equal(e, "stopAtReOrder") THEN
      NARROW(arg, T).eventDataRec.stopAtReOrder :=
          FormsVBT.GetBoolean(fv, "stopAtReOrder");
    END;
    IF Text.Equal(e, "waitAtReOrder") THEN
      NARROW(arg, T).eventDataRec.waitAtReOrder :=
          FormsVBT.GetInteger(fv, "waitAtReOrder");
    END;
    IF Text.Equal(e, "stopAtStretch") THEN
      NARROW(arg, T).eventDataRec.stopAtStretch :=
          FormsVBT.GetBoolean(fv, "stopAtStretch");
    END;
    IF Text.Equal(e, "waitAtStretch") THEN
      NARROW(arg, T).eventDataRec.waitAtStretch :=
          FormsVBT.GetInteger(fv, "waitAtStretch");
    END;
    IF Text.Equal(e, "stopAtSnap") THEN
      NARROW(arg, T).eventDataRec.stopAtSnap :=
          FormsVBT.GetBoolean(fv, "stopAtSnap");
    END;
    IF Text.Equal(e, "waitAtSnap") THEN
      NARROW(arg, T).eventDataRec.waitAtSnap :=
          FormsVBT.GetInteger(fv, "waitAtSnap");
    END;
    IF Text.Equal(e, "stopAtShuffle") THEN
      NARROW(arg, T).eventDataRec.stopAtShuffle :=
          FormsVBT.GetBoolean(fv, "stopAtShuffle");
    END;
    IF Text.Equal(e, "waitAtShuffle") THEN
      NARROW(arg, T).eventDataRec.waitAtShuffle :=
          FormsVBT.GetInteger(fv, "waitAtShuffle");
    END;
  END HullDoIt;

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

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.stopAtSetHalfPlane :=
        FormsVBT.GetBoolean(fv, "stopAtSetHalfPlane");
    alg.eventDataRec.waitAtSetHalfPlane :=
        FormsVBT.GetInteger(fv, "waitAtSetHalfPlane");
    alg.eventDataRec.stopAtClearHead :=
        FormsVBT.GetBoolean(fv, "stopAtClearHead");
    alg.eventDataRec.waitAtClearHead :=
        FormsVBT.GetInteger(fv, "waitAtClearHead");
    alg.eventDataRec.stopAtTestSite :=
        FormsVBT.GetBoolean(fv, "stopAtTestSite");
    alg.eventDataRec.waitAtTestSite :=
        FormsVBT.GetInteger(fv, "waitAtTestSite");
    alg.eventDataRec.stopAtClearTest :=
        FormsVBT.GetBoolean(fv, "stopAtClearTest");
    alg.eventDataRec.waitAtClearTest :=
        FormsVBT.GetInteger(fv, "waitAtClearTest");
    alg.eventDataRec.stopAtSetTail :=
        FormsVBT.GetBoolean(fv, "stopAtSetTail");
    alg.eventDataRec.waitAtSetTail :=
        FormsVBT.GetInteger(fv, "waitAtSetTail");
    alg.eventDataRec.stopAtClearTail :=
        FormsVBT.GetBoolean(fv, "stopAtClearTail");
    alg.eventDataRec.waitAtClearTail :=
        FormsVBT.GetInteger(fv, "waitAtClearTail");
    alg.eventDataRec.stopAtMoveHalfPlane :=
        FormsVBT.GetBoolean(fv, "stopAtMoveHalfPlane");
    alg.eventDataRec.waitAtMoveHalfPlane :=
        FormsVBT.GetInteger(fv, "waitAtMoveHalfPlane");
    alg.eventDataRec.stopAtConfirm :=
        FormsVBT.GetBoolean(fv, "stopAtConfirm");
    alg.eventDataRec.waitAtConfirm :=
        FormsVBT.GetInteger(fv, "waitAtConfirm");
    alg.eventDataRec.stopAtDeny :=
        FormsVBT.GetBoolean(fv, "stopAtDeny");
    alg.eventDataRec.waitAtDeny :=
        FormsVBT.GetInteger(fv, "waitAtDeny");
    alg.eventDataRec.stopAtSwap :=
        FormsVBT.GetBoolean(fv, "stopAtSwap");
    alg.eventDataRec.waitAtSwap :=
        FormsVBT.GetInteger(fv, "waitAtSwap");
    alg.eventDataRec.stopAtSentinel :=
        FormsVBT.GetBoolean(fv, "stopAtSentinel");
    alg.eventDataRec.waitAtSentinel :=
        FormsVBT.GetInteger(fv, "waitAtSentinel");
    alg.eventDataRec.stopAtReOrder :=
        FormsVBT.GetBoolean(fv, "stopAtReOrder");
    alg.eventDataRec.waitAtReOrder :=
        FormsVBT.GetInteger(fv, "waitAtReOrder");
    alg.eventDataRec.stopAtStretch :=
        FormsVBT.GetBoolean(fv, "stopAtStretch");
    alg.eventDataRec.waitAtStretch :=
        FormsVBT.GetInteger(fv, "waitAtStretch");
    alg.eventDataRec.stopAtSnap :=
        FormsVBT.GetBoolean(fv, "stopAtSnap");
    alg.eventDataRec.waitAtSnap :=
        FormsVBT.GetInteger(fv, "waitAtSnap");
    alg.eventDataRec.stopAtShuffle :=
        FormsVBT.GetBoolean(fv, "stopAtShuffle");
    alg.eventDataRec.waitAtShuffle :=
        FormsVBT.GetInteger(fv, "waitAtShuffle");
  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, "stopAtSetHalfPlane",
                        alg.eventDataRec.stopAtSetHalfPlane);
    FormsVBT.PutInteger(fv, "waitAtSetHalfPlane",
                        alg.eventDataRec.waitAtSetHalfPlane);
    FormsVBT.PutBoolean(fv, "stopAtClearHead",
                        alg.eventDataRec.stopAtClearHead);
    FormsVBT.PutInteger(fv, "waitAtClearHead",
                        alg.eventDataRec.waitAtClearHead);
    FormsVBT.PutBoolean(fv, "stopAtTestSite",
                        alg.eventDataRec.stopAtTestSite);
    FormsVBT.PutInteger(fv, "waitAtTestSite",
                        alg.eventDataRec.waitAtTestSite);
    FormsVBT.PutBoolean(fv, "stopAtClearTest",
                        alg.eventDataRec.stopAtClearTest);
    FormsVBT.PutInteger(fv, "waitAtClearTest",
                        alg.eventDataRec.waitAtClearTest);
    FormsVBT.PutBoolean(fv, "stopAtSetTail",
                        alg.eventDataRec.stopAtSetTail);
    FormsVBT.PutInteger(fv, "waitAtSetTail",
                        alg.eventDataRec.waitAtSetTail);
    FormsVBT.PutBoolean(fv, "stopAtClearTail",
                        alg.eventDataRec.stopAtClearTail);
    FormsVBT.PutInteger(fv, "waitAtClearTail",
                        alg.eventDataRec.waitAtClearTail);
    FormsVBT.PutBoolean(fv, "stopAtMoveHalfPlane",
                        alg.eventDataRec.stopAtMoveHalfPlane);
    FormsVBT.PutInteger(fv, "waitAtMoveHalfPlane",
                        alg.eventDataRec.waitAtMoveHalfPlane);
    FormsVBT.PutBoolean(fv, "stopAtConfirm",
                        alg.eventDataRec.stopAtConfirm);
    FormsVBT.PutInteger(fv, "waitAtConfirm",
                        alg.eventDataRec.waitAtConfirm);
    FormsVBT.PutBoolean(fv, "stopAtDeny",
                        alg.eventDataRec.stopAtDeny);
    FormsVBT.PutInteger(fv, "waitAtDeny",
                        alg.eventDataRec.waitAtDeny);
    FormsVBT.PutBoolean(fv, "stopAtSwap",
                        alg.eventDataRec.stopAtSwap);
    FormsVBT.PutInteger(fv, "waitAtSwap",
                        alg.eventDataRec.waitAtSwap);
    FormsVBT.PutBoolean(fv, "stopAtSentinel",
                        alg.eventDataRec.stopAtSentinel);
    FormsVBT.PutInteger(fv, "waitAtSentinel",
                        alg.eventDataRec.waitAtSentinel);
    FormsVBT.PutBoolean(fv, "stopAtReOrder",
                        alg.eventDataRec.stopAtReOrder);
    FormsVBT.PutInteger(fv, "waitAtReOrder",
                        alg.eventDataRec.waitAtReOrder);
    FormsVBT.PutBoolean(fv, "stopAtStretch",
                        alg.eventDataRec.stopAtStretch);
    FormsVBT.PutInteger(fv, "waitAtStretch",
                        alg.eventDataRec.waitAtStretch);
    FormsVBT.PutBoolean(fv, "stopAtSnap",
                        alg.eventDataRec.stopAtSnap);
    FormsVBT.PutInteger(fv, "waitAtSnap",
                        alg.eventDataRec.waitAtSnap);
    FormsVBT.PutBoolean(fv, "stopAtShuffle",
                        alg.eventDataRec.stopAtShuffle);
    FormsVBT.PutInteger(fv, "waitAtShuffle",
                        alg.eventDataRec.waitAtShuffle);
    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, "ctOfSetHalfPlane",
                        Fmt.Int(alg.eventDataRec.ctOfSetHalfPlane));
    FormsVBT.PutText(fv, "ctOfClearHead",
                        Fmt.Int(alg.eventDataRec.ctOfClearHead));
    FormsVBT.PutText(fv, "ctOfTestSite",
                        Fmt.Int(alg.eventDataRec.ctOfTestSite));
    FormsVBT.PutText(fv, "ctOfClearTest",
                        Fmt.Int(alg.eventDataRec.ctOfClearTest));
    FormsVBT.PutText(fv, "ctOfSetTail",
                        Fmt.Int(alg.eventDataRec.ctOfSetTail));
    FormsVBT.PutText(fv, "ctOfClearTail",
                        Fmt.Int(alg.eventDataRec.ctOfClearTail));
    FormsVBT.PutText(fv, "ctOfMoveHalfPlane",
                        Fmt.Int(alg.eventDataRec.ctOfMoveHalfPlane));
    FormsVBT.PutText(fv, "ctOfConfirm",
                        Fmt.Int(alg.eventDataRec.ctOfConfirm));
    FormsVBT.PutText(fv, "ctOfDeny",
                        Fmt.Int(alg.eventDataRec.ctOfDeny));
    FormsVBT.PutText(fv, "ctOfSwap",
                        Fmt.Int(alg.eventDataRec.ctOfSwap));
    FormsVBT.PutText(fv, "ctOfSentinel",
                        Fmt.Int(alg.eventDataRec.ctOfSentinel));
    FormsVBT.PutText(fv, "ctOfReOrder",
                        Fmt.Int(alg.eventDataRec.ctOfReOrder));
    FormsVBT.PutText(fv, "ctOfStretch",
                        Fmt.Int(alg.eventDataRec.ctOfStretch));
    FormsVBT.PutText(fv, "ctOfSnap",
                        Fmt.Int(alg.eventDataRec.ctOfSnap));
    FormsVBT.PutText(fv, "ctOfShuffle",
                        Fmt.Int(alg.eventDataRec.ctOfShuffle));
  END CountsToFV;

PROCEDURE HullDefaultUpdateCts ( v: T; reset: BOOLEAN) =
  <* LL = VBT.mu *>
  BEGIN
    IF reset THEN
      v.eventDataRec.ctOfSetup := 0;
      v.eventDataRec.ctOfSetHalfPlane := 0;
      v.eventDataRec.ctOfClearHead := 0;
      v.eventDataRec.ctOfTestSite := 0;
      v.eventDataRec.ctOfClearTest := 0;
      v.eventDataRec.ctOfSetTail := 0;
      v.eventDataRec.ctOfClearTail := 0;
      v.eventDataRec.ctOfMoveHalfPlane := 0;
      v.eventDataRec.ctOfConfirm := 0;
      v.eventDataRec.ctOfDeny := 0;
      v.eventDataRec.ctOfSwap := 0;
      v.eventDataRec.ctOfSentinel := 0;
      v.eventDataRec.ctOfReOrder := 0;
      v.eventDataRec.ctOfStretch := 0;
      v.eventDataRec.ctOfSnap := 0;
      v.eventDataRec.ctOfShuffle := 0;
    END;
    CountsToFV (v.eventData, v);
  END HullDefaultUpdateCts;

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

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

BEGIN
END HullAlgClass.