From 65142fa5d8c2bef04edf539b5f3ab88ffc5c658d Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 25 Apr 2017 13:53:59 -0400 Subject: [PATCH] add several functions and update others --- src/Event.h | 3 ++- src/Simulation.h | 1 - src/Wire.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Event.h b/src/Event.h index 6681860..592b87f 100644 --- a/src/Event.h +++ b/src/Event.h @@ -6,7 +6,7 @@ using namespace std; class Event { public: - Event(int num, int value, int setTime, Wire * output); + Event(int value, int setTime, Wire * output); friend bool operator<(const Event &e1, const Event &e2); int getValue() const; @@ -16,6 +16,7 @@ class Event { private: int evNum, evValue, evTime; Wire *out; + static int numOfEvents; }; #endif // !EVENT diff --git a/src/Simulation.h b/src/Simulation.h index 80491ca..dc3c4b8 100644 --- a/src/Simulation.h +++ b/src/Simulation.h @@ -31,7 +31,6 @@ class Simulation { priority_queue e; vector gates; vector wires; - int eventNum; }; #endif // !SIMULATION diff --git a/src/Wire.h b/src/Wire.h index 151a891..f874183 100644 --- a/src/Wire.h +++ b/src/Wire.h @@ -22,7 +22,8 @@ class Wire { string getName() const; int getLast() const; - bool setValue(int newValue, int setTime); + void setValue(int newValue, int setTime); + bool doesChange(int newValue, int setTime); void convertToIO(string newName); Gate* getGate(int index); void setLast(int last);