aboutsummaryrefslogtreecommitdiff
path: root/NodeInput.h
diff options
context:
space:
mode:
Diffstat (limited to 'NodeInput.h')
-rw-r--r--NodeInput.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/NodeInput.h b/NodeInput.h
index 71cf36c..23a5e14 100644
--- a/NodeInput.h
+++ b/NodeInput.h
@@ -4,22 +4,25 @@
class NodeInput : public Node {
public:
- NodeInput() = default;
+ NodeInput() = default;
NodeInput(const NodeInput * prototype);
~NodeInput() = default;
virtual void sim();
- SignalLevel level() { return UNDEFINED; };
+ SignalLevel level();
virtual NodeInput * clone() const;
-private:
+protected:
NodeInput(const char * type);
-SignalLevel input = UNDEFINED;
+private:
+ SignalLevel input = UNDEFINED;
};
// Input LOW and HIGH unicorns:
class NodeInputLow : public NodeInput {
+ using NodeInput::NodeInput;
+
public:
// NodeInputLow(const NodeInputLow * prototype);
// ~NodeInputLow() = default;
@@ -27,18 +30,17 @@ public:
// virtual NodeInputLow * clone() const;
private:
- NodeInputLow(const char * type);
constexpr static const char * type = "input_low";
static NodeInputLow instance;
- SignalLevel input = LOW;
+ SignalLevel input = LOW;
};
class NodeInputHigh : public NodeInput {
private:
- NodeInputHigh(const char * type);
+ using NodeInput::NodeInput;
constexpr static const char * type = "input_high";
static NodeInputHigh instance;
- SignalLevel input = HIGH;
+ SignalLevel input = HIGH;
};