blob: 0aafe50716aaf6cc3e49b21b7c272596ade3971c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "GateOr.h"
GateOr GateOr::instance(GateOr::type);
SignalLevel GateOr::level() {
SignalLevel new_level = LOW;
for (int i = 0; i < this->inputs.size(); i++){
SignalLevel l = this->inputs[i]->getLevel();
if (l == UNDEFINED) return UNDEFINED;
if (l == HIGH) new_level = HIGH;
}
return new_level;
}
GateOr::GateOr(const GateOr * prototype) : Node() { }
GateOr * GateOr::clone() const {
return new GateOr(this);
}
|