Figure 2: IOProcess class skeleton and member function Go

class IOProcess : Process
{
    virtual void Go(); // called by task executive,
                       // sends Paint(), etc.
protected:
    LCDDisplay Display;
    virtual void Paint();
    virtual void ButtonPress();
    virtual void DialMovedTo(UINT Position);
    void RegisterField(IOField *F, UINT ZOrder = 0, UINT
    TabStopIndex = 0);
    void DeRegisterField(IOField *F);
    IOField *FieldThatHasFocus();
public:
    IOProcess();
    friend IOField;
};

void IOProcess::Go()
{
    if (Display.IsVisible())
    {
        ULONG Time = GetTime() >> 3;
        if (Time != LastDisplayTime)
        {
            // no point in updating the display faster
            // than the LCD crystals can change
            UINT PressCount, i;

            PressCount = Button.GetPressCount();
            for (i = 0; i < PressCount; i += 1)
                this->ButtonPress();

            UINT Position;
            Position = Dial.GetVal1024();
            if (Position != LastDialPosition)
            {
                LastDialPosition = Position;
                this->DialMovedTo(Position);
            }
            this->Paint();
            LastDisplayTime = Time;
        }
    }
}
//End of File