add several functions and update others
This commit is contained in:
parent
10df712a45
commit
65142fa5d8
@ -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
|
||||
|
@ -31,7 +31,6 @@ class Simulation {
|
||||
priority_queue<Event> e;
|
||||
vector<Gate*> gates;
|
||||
vector<Wire*> wires;
|
||||
int eventNum;
|
||||
};
|
||||
|
||||
#endif // !SIMULATION
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user