radec/src/Event.cpp

32 lines
447 B
C++

#include "Event.h"
Event::Event(int num, int value, int setTime, Wire * output){
evNum = num;
evValue = value;
evTime = setTime;
out = output;
}
int Event::getValue() const
{
return evValue;
}
int Event::getTime() const
{
return evTime;
}
Wire * Event::getOutput() const
{
return out;
}
bool operator<(const Event &e1, const Event &e2) {
if(e1.evTime == e2.evTime) {
return e1.evNum > e2.evNum;
}
return e1.evTime > e2.evTime;
}