aboutsummaryrefslogtreecommitdiff
path: root/GateNot.cpp
blob: 04e701d7f87e87e802f6399b0d093296fec32694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "GateNot.h"

GateNot GateNot::instance(GateNot::type);

SignalLevel GateNot::level() {
	SignalLevel lvl = this->inputs[0]->getLevel();
	if (lvl == LOW) return HIGH;
	if (lvl == HIGH) return LOW;
	return UNDEFINED;
}

GateNot::GateNot(const GateNot * prototype) : Node() {
	this->min_inputs = 1;
	this->max_inputs = 1;
}

GateNot * GateNot::clone() const {
	return new GateNot(this);
}