diff options
Diffstat (limited to 'NodeInput.h')
-rw-r--r-- | NodeInput.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/NodeInput.h b/NodeInput.h new file mode 100644 index 0000000..73ef6e1 --- /dev/null +++ b/NodeInput.h @@ -0,0 +1,43 @@ +#pragma once + +#include "Node.h" + +class NodeInput : public Node { +public: + NodeInput() = default; + NodeInput(const NodeInput * prototype); + ~NodeInput() = default; + virtual void compare(); + virtual NodeInput * clone() const; + +private: + NodeInput(const char * type); + + SignalLevel level = UNDEFINED; +}; + +// Input LOW and HIGH unicorns: + +class NodeInputLow : public NodeInput { +public: + // NodeInputLow(const NodeInputLow * prototype); + // ~NodeInputLow() = default; + // virtual void compare(); + // virtual NodeInputLow * clone() const; + +private: + NodeInputLow(const char * type); + constexpr static const char * type = "input_low"; + static NodeInputLow instance; + + SignalLevel level = LOW; +}; + +class NodeInputHigh : public NodeInput { +private: + NodeInputHigh(const char * type); + constexpr static const char * type = "input_high"; + static NodeInputHigh instance; + + SignalLevel level = HIGH; +}; |