diff --git a/src/Gate.h b/src/Gate.h index 5607793..b9b19e6 100644 --- a/src/Gate.h +++ b/src/Gate.h @@ -8,7 +8,7 @@ class Wire; class Gate { public: virtual Event evaluate(int) = 0; - + void setOut(int time, int value); protected: Wire *in1, *in2, *out; int delay; diff --git a/src/gate.cpp b/src/gate.cpp index 613bbe0..5499e92 100644 --- a/src/gate.cpp +++ b/src/gate.cpp @@ -1,5 +1,10 @@ #include "gate.h" -gate::gate() +Gate::Gate() { } + +void Gate::setOut(int newValue, int setTime) +{ + out->setValue(newValue, setTime); +}