aboutsummaryrefslogtreecommitdiff
path: root/NodeInput.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-12 18:03:07 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-12 18:03:07 +0200
commit50d3fb09278d57b5a35e15074cc025a62476c5a7 (patch)
treedbd7c9f62e49c0ef01e5d970758f08450e2a2af5 /NodeInput.h
parenta6eb3c69badee386579fba82cae5b29cfb3e8171 (diff)
WIP NodeInput kinda not really working
Diffstat (limited to 'NodeInput.h')
-rw-r--r--NodeInput.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/NodeInput.h b/NodeInput.h
index 23a5e14..7ec296b 100644
--- a/NodeInput.h
+++ b/NodeInput.h
@@ -2,45 +2,36 @@
#include "Node.h"
+#include "prut.h"
+
class NodeInput : public Node {
public:
- NodeInput() = default;
+ using Node::Node;
NodeInput(const NodeInput * prototype);
- ~NodeInput() = default;
- virtual void sim();
- SignalLevel level();
+
virtual NodeInput * clone() const;
protected:
- NodeInput(const char * type);
-
-private:
- SignalLevel input = UNDEFINED;
+ virtual SignalLevel level();
};
-// Input LOW and HIGH unicorns:
-
class NodeInputLow : public NodeInput {
- using NodeInput::NodeInput;
-
public:
- // NodeInputLow(const NodeInputLow * prototype);
- // ~NodeInputLow() = default;
- // virtual void compare();
- // virtual NodeInputLow * clone() const;
+ using NodeInput::NodeInput;
+ virtual SignalLevel level();
private:
constexpr static const char * type = "input_low";
static NodeInputLow instance;
-
- SignalLevel input = LOW;
};
class NodeInputHigh : public NodeInput {
-private:
+public:
using NodeInput::NodeInput;
+ virtual SignalLevel level();
+
+private:
constexpr static const char * type = "input_high";
static NodeInputHigh instance;
-
- SignalLevel input = HIGH;
};
+