diff options
author | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2024-06-12 12:05:45 +0200 |
---|---|---|
committer | UnavailableDev <69792062+UnavailableDev@users.noreply.github.com> | 2024-06-12 12:05:45 +0200 |
commit | 126a3c79516a6417181c3fe924084032d653b596 (patch) | |
tree | 1f1d356eccdf7d316cf7e991af036f0c0a6a53bd /Node.h | |
parent | c084bee21f66e6322d4d55b8700f0779f2c58d0d (diff) | |
parent | 8e0a865dd375baa71357ce817847ea8a9144434c (diff) |
Merge branch 'master' into node
Diffstat (limited to 'Node.h')
-rw-r--r-- | Node.h | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -1,32 +1,32 @@ #pragma once + #include <string> #include <vector> #include "Observer.h" #include "Net.h" +using std::string; +using std::vector; +class Node : Observer { +public: + Node() = default; + virtual ~Node() = default; + virtual Node * clone() const = 0; -class Node: Observer { - protected: - std::string label; - std::string type; +public: + void update(); + virtual void addInput(Net *); + virtual void setOutput(Net *); + virtual void compare() = 0; - std::vector<Net*> inputs; - Net* output; +protected: + Node(const char * type); - public: - Node(/* args */); - virtual ~Node(); - void update(); - virtual void addInput(Net*); - virtual void setOutput(Net*); - virtual void compare() = 0; -}; + string label; -class GateAnd: public Node { - public: - GateAnd(){}; - ~GateAnd(){}; - void compare(); + vector<Net *> inputs; + Net * output; }; + |