aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2024-06-04 10:30:24 +0200
committerUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2024-06-04 10:30:24 +0200
commit760520d490ef9a382aee9b0338ba289b1538974b (patch)
tree58577880217f3bb20869da16ebe7b15d1a238c55
parent5f7fda2d9103d6f638747143931bb82822608fc7 (diff)
Renamed class Gate -> 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(){};