aboutsummaryrefslogtreecommitdiff
path: root/NodeInput.cpp
blob: fafbd3b1e78a3104c6438335f6ecc7980fe9a1f8 (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
28
29
30
31
#include "NodeInput.h"

#include <iostream>

NodeInputLow NodeInputLow::instance(NodeInputLow::type);
NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type);

NodeInput::NodeInput(const char * type) : Node(type) { };

void NodeInput::sim() {
	if (this->output == nullptr) return;
	// std::cout << this->level << " bar\n";
	this->output->setLevel(this->input);
}

NodeInput::NodeInput(const NodeInput * prototype) : Node() { }

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

SignalLevel NodeInput::level() {
	return UNDEFINED;
};

// NodeInputLow::NodeInputLow(const NodeInputLow * prototype) : NodeInput() { }

// // INPUT_HIGH
// NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type);
// NodeInputHigh::NodeInputHigh(const char * type) : NodeInput(type) { }
// NodeInputHigh::NodeInputHigh(const NodeInputHigh * prototype) : NodeInput() { }