blob: 513880543c1461ea2a58d926d41ee1132689aa8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "NodeOutput.h"
#include "Exception.h"
#include <iostream>
NodeOutput NodeOutput::instance(NodeOutput::type);
NodeOutput::NodeOutput(const char * type) : Node(type) { }
void NodeOutput::sim() {
if (this->inputs.size() == 0)
throw CircuitException("No inputs on probe");
std::cout << "Probe signal level: " << this->inputs[0]->getLevel() << std::endl;
}
NodeOutput::NodeOutput(const NodeOutput * prototype) : Node() { }
NodeOutput * NodeOutput::clone() const {
return new NodeOutput(this);
}
|