********************************************************************
* NOTE: This file is generated automatically from the event * definition file Hull.evt. ********************************************************************<* PRAGMA LL *> MODULEevent handling methods:; <*NOWARN*> IMPORT HullFmt, TextPort, Rd, IntList, ZeusClass; <*NOWARN*> IMPORT Filter, TextEditVBT, Fmt, SiteList, ZFmt, Wr; <*NOWARN*> IMPORT ZeusPanel, FormsVBT, HullViewClass, VBT, View; <* FATAL FormsVBT.Error, FormsVBT.Unimplemented *> REVEAL T = Public BRANDED OBJECT fv: FormsVBT.T := NIL; te: TextEditVBT.T := NIL; OVERRIDES init := TViewInit; install := TViewInstall; delete := TViewDelete; snapshot := TViewSnapshot; restore := TViewRestore; config := TViewConfig; reactivity := TViewReactivity; startrun := TViewStartrun; endrun := TViewEndrun; oeSetup := Setup; oeSetHalfPlane := SetHalfPlane; oeClearHead := ClearHead; oeTestSite := TestSite; oeClearTest := ClearTest; oeSetTail := SetTail; oeClearTail := ClearTail; oeMoveHalfPlane := MoveHalfPlane; oeConfirm := Confirm; oeDeny := Deny; oeSwap := Swap; oeSentinel := Sentinel; oeReOrder := ReOrder; oeStretch := Stretch; oeSnap := Snap; oeShuffle := Shuffle; END; PROCEDURE HullTranscriptView TViewInit (view: T): T = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "init"); RETURN HullViewClass.T.init (view, NIL); END TViewInit; PROCEDUREClear (<* UNUSED *> fv : FormsVBT.T; <* UNUSED *> name: TEXT; cl : REFANY; <* UNUSED *> time: VBT.TimeStamp) = BEGIN TextPort.SetText(NARROW(cl, T).te.tp, "") END Clear; PROCEDURETViewInstall (view: T) = <* LL = VBT.mu *> BEGIN view.fv := ZeusPanel.NewForm("HullTranscriptView.fv"); view.te := FormsVBT.GetVBT(view.fv, "transcript"); TViewZTrace (view, "install"); FormsVBT.AttachProc(view.fv, "clear", Clear, view); EVAL Filter.Replace (view, view.fv); HullViewClass.T.install (view); END TViewInstall; PROCEDURETViewDelete (view: T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "delete"); HullViewClass.T.delete (view); END TViewDelete; PROCEDURETViewSnapshot (view: T; wr: Wr.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "snapshot"); HullViewClass.T.snapshot (view, wr); END TViewSnapshot; PROCEDURETViewRestore (view: T; rd: Rd.T) RAISES {ZeusClass.Error} = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "restore"); HullViewClass.T.restore (view, rd); END TViewRestore; PROCEDURETViewConfig ( view: T; state: ZeusClass.StateChange; o: ZeusClass.T) = <* LL = VBT.mu *> BEGIN TViewZTrace (view, "config"); HullViewClass.T.config (view, state, o); END TViewConfig; PROCEDURETViewReactivity (view: T; <*UNUSED*> on: BOOLEAN) = <* LL = VBT.mu *> BEGIN TViewZTrace(view, "reactivity"); HullViewClass.T.reactivity (view, TRUE); END TViewReactivity; PROCEDURETViewStartrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "startrun"); HullViewClass.T.startrun (view); END TViewStartrun; PROCEDURETViewEndrun (view: T) = <* LL = {} *> BEGIN TViewZTrace (view, "endrun"); HullViewClass.T.endrun (view); END TViewEndrun;PROCEDURESetup (view: T; trueSites, auxSites: SiteList.T) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Setup ...") ELSE TViewTrace (view, "Setup " & HullFmt.SiteList(trueSites) & " " & HullFmt.SiteList(auxSites) ) END END END END Setup; PROCEDURESetHalfPlane (view: T; tail, head: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "SetHalfPlane ...") ELSE TViewTrace (view, "SetHalfPlane " & Fmt.Int(tail) & " " & Fmt.Int(head) ) END END END END SetHalfPlane; PROCEDUREClearHead (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ClearHead ...") ELSE TViewTrace (view, "ClearHead " ) END END END END ClearHead; PROCEDURETestSite (view: T; i: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "TestSite ...") ELSE TViewTrace (view, "TestSite " & Fmt.Int(i) ) END END END END TestSite; PROCEDUREClearTest (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ClearTest ...") ELSE TViewTrace (view, "ClearTest " ) END END END END ClearTest; PROCEDURESetTail (view: T; i: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "SetTail ...") ELSE TViewTrace (view, "SetTail " & Fmt.Int(i) ) END END END END SetTail; PROCEDUREClearTail (view: T; ) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ClearTail ...") ELSE TViewTrace (view, "ClearTail " ) END END END END ClearTail; PROCEDUREMoveHalfPlane (view: T; tail, head: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "MoveHalfPlane ...") ELSE TViewTrace (view, "MoveHalfPlane " & Fmt.Int(tail) & " " & Fmt.Int(head) ) END END END END MoveHalfPlane; PROCEDUREConfirm (view: T; tail, head: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Confirm ...") ELSE TViewTrace (view, "Confirm " & Fmt.Int(tail) & " " & Fmt.Int(head) ) END END END END Confirm; PROCEDUREDeny (view: T; tail, head: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Deny ...") ELSE TViewTrace (view, "Deny " & Fmt.Int(tail) & " " & Fmt.Int(head) ) END END END END Deny; PROCEDURESwap (view: T; i, j: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Swap ...") ELSE TViewTrace (view, "Swap " & Fmt.Int(i) & " " & Fmt.Int(j) ) END END END END Swap; PROCEDURESentinel (view: T; i, j: INTEGER) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Sentinel ...") ELSE TViewTrace (view, "Sentinel " & Fmt.Int(i) & " " & Fmt.Int(j) ) END END END END Sentinel; PROCEDUREReOrder (view: T; l: IntList.T) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "ReOrder ...") ELSE TViewTrace (view, "ReOrder " & HullFmt.IntList(l) ) END END END END ReOrder; PROCEDUREStretch (view: T; hullSites, otherSites: IntList.T) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Stretch ...") ELSE TViewTrace (view, "Stretch " & HullFmt.IntList(hullSites) & " " & HullFmt.IntList(otherSites) ) END END END END Stretch; PROCEDURESnap (view: T; hullSites, otherSites: IntList.T) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Snap ...") ELSE TViewTrace (view, "Snap " & HullFmt.IntList(hullSites) & " " & HullFmt.IntList(otherSites) ) END END END END Snap; PROCEDUREShuffle (view: T; hullSites, otherSites: IntList.T) = <* LL = {} *> BEGIN LOCK VBT.mu DO IF FormsVBT.GetBoolean(view.fv, "alg") THEN IF NOT FormsVBT.GetBoolean(view.fv, "args") THEN TViewTrace (view, "Shuffle ...") ELSE TViewTrace (view, "Shuffle " & HullFmt.IntList(hullSites) & " " & HullFmt.IntList(otherSites) ) END END END END Shuffle; PROCEDURETViewZTrace (view: T; t: TEXT) = BEGIN IF view.fv # NIL THEN IF FormsVBT.GetBoolean(view.fv, "zeus") THEN TextPort.PutText(view.te.tp, "**zeus: " & t & "\n"); TextPort.Normalize(view.te.tp, LAST(INTEGER)) END END END TViewZTrace; PROCEDURETViewTrace (view: T; t: TEXT) = BEGIN TextPort.PutText(view.te.tp, "--event: " & t & "\n"); TextPort.Normalize(view.te.tp, LAST(INTEGER)) END TViewTrace; PROCEDURETViewNew (): View.T = BEGIN RETURN NEW(T).init() END TViewNew; BEGIN ZeusPanel.RegisterView (TViewNew, "Hull Transcript View", "Hull"); END HullTranscriptView.