diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-04 10:38:14 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-04 10:38:14 +0200 |
commit | c084bee21f66e6322d4d55b8700f0779f2c58d0d (patch) | |
tree | 49190903b19e283149a45e6f1e54a13405367aed | |
parent | d762fa59c4182355da40cbc415181a362b89117f (diff) | |
parent | 760520d490ef9a382aee9b0338ba289b1538974b (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
@@ -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; @@ -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(){}; |