blob: bd30afec70d8ed49ecb238bffb1dc996ba1bb9e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "NodeOutput.h"
#include "Exception.h"
NodeOutput NodeOutput::instance(NodeOutput::type);
void NodeOutput::sim() {
Node::sim();
this->input = this->inputs[0]->getLevel();
}
NodeOutput::NodeOutput(const NodeOutput * prototype) : Node() {
this->min_inputs = 1;
this->max_inputs = 1;
}
NodeOutput * NodeOutput::clone() const {
return new NodeOutput(this);
}
void NodeOutput::setOutput(Net *) {
throw NodeException(this, "NodeOutput cannot have an output");
}
SignalLevel NodeOutput::level() {
return this->input;
}
|