diff options
Diffstat (limited to 'NodeInput.h')
-rw-r--r-- | NodeInput.h | 33 |
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; }; + |