aboutsummaryrefslogtreecommitdiff
path: root/Gate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Gate.cpp')
-rw-r--r--Gate.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/Gate.cpp b/Gate.cpp
deleted file mode 100644
index 0724b44..0000000
--- a/Gate.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include "Gate.h"
-
-#include <iostream>
-
-Gate::Gate(){}
-Gate::~Gate(){}
-void Gate::addInput(Net* net){
- net->attach(this);
-}
-void Gate::setOutput(Net* net){
- this->output = net;
-}
-
-void Gate::update(){
- std::cout << "updated" << std::endl;
- this->compare();
-}
-
-/*/ Concrete Gates: /*/
-
-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);
- // }
-
-}