aboutsummaryrefslogtreecommitdiff
path: root/Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Node.cpp')
-rw-r--r--Node.cpp36
1 files changed, 6 insertions, 30 deletions
diff --git a/Node.cpp b/Node.cpp
index 05ac5d6..5deaf03 100644
--- a/Node.cpp
+++ b/Node.cpp
@@ -2,11 +2,14 @@
#include <iostream>
-Node::Node(){}
-Node::~Node(){}
-void Node::addInput(Net* net){
+Node::Node(const char * type) {
+
+}
+
+void Node::addInput(Net* net) {
net->attach(this);
}
+
void Node::setOutput(Net* net){
this->output = net;
}
@@ -16,30 +19,3 @@ void Node::update(){
this->compare();
}
-/*/ Concrete Nodes: /*/
-
-void GateAnd::compare(){
- SignalLevel new_out = HIGH;
-// TODO fix segfault somewhere below
-// for (int i = 0; i < this->inputs.size(); i++){
-// switch (this->inputs[i]->getLevel()){
-// case LOW:
-// new_out = LOW;
-// break;
-// case HIGH:
-// continue;
-// break;
-// case UNDEFINED:
-// default:
-// new_out = UNDEFINED;
-// exit;
-// break;
-// }
-// }
-
-// if (this->output->getLevel() == new_out){
-// /* do nothing */
-// } else {
-// this->output->setLevel(new_out);
-// }
-}