add several functions and update others

This commit is contained in:
Joel Beckmeyer 2017-04-25 13:53:59 -04:00
parent 10df712a45
commit 65142fa5d8
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -31,7 +31,6 @@ class Simulation {
priority_queue<Event> e;
vector<Gate*> gates;
vector<Wire*> wires;
int eventNum;
};
#endif // !SIMULATION

View File

@ -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);