You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation uses many case statements to handle contest-specific messaging. This issue will introduce a virtual function into TContest class hierarchy to allow each derived contests to define their own messages (e.g. CQ will be different for some contests, the exchange is different, etc.)
The class diagram below shows a new virtual method added to the TContest base class. A new method, SendMsg will be added to handle contest-specific message generation.
Added new virtual method to TContest.SendMsg(). This is derived by those
contests with contest-specific messaging. Codes was moved from its old
location into the new methods. No functionality was changed - only code
movement. This fixes#184.
I like this change. It removes lots of case statements. Here is an
example from ARRL Field Day...
```
{
Overrides TContest.SendMsg() to send contest-specific messages.
Adding a contest: TContest.SendMsg(AMsg): send contest-specfic messages
}
procedure TArrlFieldDay.SendMsg(const AStn: TStation; const AMsg: TStationMessage);
begin
case AMsg of
msgCQ: SendText(AStn, 'CQ FD <my>');
msgNrQm:
case Random(5) of
0,1: SendText(AStn, 'NR?');
2: SendText(AStn, 'SECT?');
3: SendText(AStn, 'CLASS?');
4: SendText(AStn, 'CL?');
end;
msgLongCQ: SendText(AStn, 'CQ CQ FD <my> <my> FD'); // QrmStation only
else
inherited SendMsg(AStn, AMsg);
end;
end;
```
Note - I added many people to this review to keep people informed of the
design change. My next step is to integrate the SST Contest.
The current implementation uses many case statements to handle contest-specific messaging. This issue will introduce a virtual function into
TContest
class hierarchy to allow each derived contests to define their own messages (e.g. CQ will be different for some contests, the exchange is different, etc.)The class diagram below shows a new virtual method added to the TContest base class. A new method,
SendMsg
will be added to handle contest-specific message generation.The text was updated successfully, but these errors were encountered: