2017-04-23 19:13:23 -04:00
|
|
|
#include "Event.h"
|
|
|
|
|
|
|
|
Event::Event(int num, int value, int setTime, Wire * output){
|
|
|
|
evNum = num;
|
|
|
|
evValue = value;
|
|
|
|
evTime = setTime;
|
|
|
|
out = output;
|
|
|
|
}
|
|
|
|
|
2017-04-24 20:13:22 -04:00
|
|
|
int Event::getValue() const
|
|
|
|
{
|
|
|
|
return evValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
int Event::getTime() const
|
|
|
|
{
|
|
|
|
return evTime;
|
|
|
|
}
|
|
|
|
|
|
|
|
Wire * Event::getOutput() const
|
|
|
|
{
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
2017-04-23 19:13:23 -04:00
|
|
|
bool operator<(const Event &e1, const Event &e2) {
|
|
|
|
if(e1.evTime == e2.evTime) {
|
|
|
|
return e1.evNum > e2.evNum;
|
|
|
|
}
|
|
|
|
return e1.evTime > e2.evTime;
|
|
|
|
}
|
|
|
|
|