aboutsummaryrefslogtreecommitdiff
path: root/Node.h
diff options
context:
space:
mode:
authorUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2024-06-12 12:05:45 +0200
committerUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2024-06-12 12:05:45 +0200
commit126a3c79516a6417181c3fe924084032d653b596 (patch)
tree1f1d356eccdf7d316cf7e991af036f0c0a6a53bd /Node.h
parentc084bee21f66e6322d4d55b8700f0779f2c58d0d (diff)
parent8e0a865dd375baa71357ce817847ea8a9144434c (diff)
Merge branch 'master' into node
Diffstat (limited to 'Node.h')
-rw-r--r--Node.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/Node.h b/Node.h
index f1845a9..43cfc6c 100644
--- a/Node.h
+++ b/Node.h
@@ -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;
};
+