aboutsummaryrefslogtreecommitdiff
path: root/NodeInput.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-16 09:21:18 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-16 09:21:18 +0200
commit3cf454ef959b36f90803fb63fcb2fe26b85335a0 (patch)
tree24f7c2f2f71190918aa14a416902fb2743bf3493 /NodeInput.cpp
parentbdb2d85a244b5ebb462c8b9763a3b539b0cc68f3 (diff)
better errors + fix min/max input shit
Diffstat (limited to 'NodeInput.cpp')
-rw-r--r--NodeInput.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/NodeInput.cpp b/NodeInput.cpp
index 591c2ca..e4ddbb9 100644
--- a/NodeInput.cpp
+++ b/NodeInput.cpp
@@ -1,12 +1,16 @@
#include "NodeInput.h"
+#include "Exception.h"
NodeInputLow NodeInputLow::instance(NodeInputLow::type);
NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type);
-NodeInput::NodeInput() {
- this->min_inputs = -1;
+NodeInput::NodeInput() : Node() {
+ this->min_inputs = 0;
this->max_inputs = 0;
}
+void NodeInput::addInput(Net *) {
+ throw NodeException(this, "NodeInput cannot have inputs");
+}
NodeInputLow * NodeInputLow::clone() const {
return new NodeInputLow(this);