aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-04 10:38:14 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-04 10:38:14 +0200
commitc084bee21f66e6322d4d55b8700f0779f2c58d0d (patch)
tree49190903b19e283149a45e6f1e54a13405367aed
parentd762fa59c4182355da40cbc415181a362b89117f (diff)
parent760520d490ef9a382aee9b0338ba289b1538974b (diff)
Merge branch 'node' of github.com:lonkaars/depa into node
-rw-r--r--Node.cpp (renamed from Gate.cpp)14
-rw-r--r--Node.h (renamed from Gate.h)8
2 files changed, 11 insertions, 11 deletions
diff --git a/Gate.cpp b/Node.cpp
index 0724b44..d351af1 100644
--- a/Gate.cpp
+++ b/Node.cpp
@@ -1,22 +1,22 @@
-#include "Gate.h"
+#include "Node.h"
#include <iostream>
-Gate::Gate(){}
-Gate::~Gate(){}
-void Gate::addInput(Net* net){
+Node::Node(){}
+Node::~Node(){}
+void Node::addInput(Net* net){
net->attach(this);
}
-void Gate::setOutput(Net* net){
+void Node::setOutput(Net* net){
this->output = net;
}
-void Gate::update(){
+void Node::update(){
std::cout << "updated" << std::endl;
this->compare();
}
-/*/ Concrete Gates: /*/
+/*/ Concrete Nodes: /*/
void GateAnd::compare(){
SignalLevel new_out = HIGH;
diff --git a/Gate.h b/Node.h
index 3f34b7a..f1845a9 100644
--- a/Gate.h
+++ b/Node.h
@@ -7,7 +7,7 @@
-class Gate: Observer {
+class Node: Observer {
protected:
std::string label;
std::string type;
@@ -16,15 +16,15 @@ class Gate: Observer {
Net* output;
public:
- Gate(/* args */);
- virtual ~Gate();
+ Node(/* args */);
+ virtual ~Node();
void update();
virtual void addInput(Net*);
virtual void setOutput(Net*);
virtual void compare() = 0;
};
-class GateAnd: public Gate {
+class GateAnd: public Node {
public:
GateAnd(){};
~GateAnd(){};