aboutsummaryrefslogtreecommitdiff
path: root/Node.h
diff options
context:
space:
mode:
Diffstat (limited to 'Node.h')
-rw-r--r--Node.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/Node.h b/Node.h
new file mode 100644
index 0000000..f1845a9
--- /dev/null
+++ b/Node.h
@@ -0,0 +1,32 @@
+#pragma once
+#include <string>
+#include <vector>
+
+#include "Observer.h"
+#include "Net.h"
+
+
+
+class Node: Observer {
+ protected:
+ std::string label;
+ std::string type;
+
+ std::vector<Net*> inputs;
+ Net* output;
+
+ public:
+ Node(/* args */);
+ virtual ~Node();
+ void update();
+ virtual void addInput(Net*);
+ virtual void setOutput(Net*);
+ virtual void compare() = 0;
+};
+
+class GateAnd: public Node {
+ public:
+ GateAnd(){};
+ ~GateAnd(){};
+ void compare();
+};