home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR9
/
WIZTOO.ZIP
/
BRDCASTR.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-09-22
|
1KB
|
47 lines
// Module: BRDCASTR.CPP
#include <stdio.h>
#include "BRDCASTR.H"
#include "CHNNLDEF.H"
Broadcaster oBroadcaster;
int Broadcaster::Connect (WindData *op) {
return oWindDataChannel.Add(op); }
int Broadcaster::Disconnect (WindData *op) {
return oWindDataChannel.Delete(op); }
void Broadcaster::BroadcastWindData (int iSpeed, int iDirection) {
for (void *op = oWindDataChannel.First();
op != NULL;
op = oWindDataChannel.Next())
{
((WindData *)op)->ReceiveWindData(iSpeed, iDirection);
}
}
int Broadcaster::Connect (AirData *op) {
return oAirDataChannel.Add(op); }
int Broadcaster::Disconnect (AirData *op) {
return oAirDataChannel.Delete(op); }
void Broadcaster::BroadcastAirData (int iTemperature,
int iBarometricPressure,
int iHumdity) {
for (void *op = oAirDataChannel.First();
op != NULL;
op = oAirDataChannel.Next())
{
((AirData *)op)->ReceiveAirData(iTemperature, iBarometricPressure, iHumdity);
}
}
int Broadcaster::Connect (TornadoWarning *op) {
return oTornadoWarningChannel.Add(op); }
int Broadcaster::Disconnect (TornadoWarning *op) {
return oTornadoWarningChannel.Delete(op); }
void Broadcaster::BroadcastTornadoWarning (void) {
for (void *op = oTornadoWarningChannel.First();
op != NULL;
op = oTornadoWarningChannel.Next())
{
((TornadoWarning *)op)->ReceiveTornadoWarning();
}
}