aboutsummaryrefslogtreecommitdiff
path: root/NodeInput.h
blob: 9b87f3b7037fe32b019691bf7b28819688c4e054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once

#include "Node.h"

#include "prut.h"

class NodeInput : public Node {
public:
	NodeInput();
	~NodeInput() = default;

protected:
	using Node::Node;
};

class NodeInputLow : public NodeInput {
public:
	virtual NodeInputLow * clone() const;

protected:
	SignalLevel level();
	using NodeInput::NodeInput;

private:
	NodeInputLow(const NodeInputLow *) : NodeInput() {}
	constexpr static const char * type = "input_low";
	static NodeInputLow instance;
};

class NodeInputHigh : public NodeInput {
public:
	virtual NodeInputHigh * clone() const;

protected:
	SignalLevel level();
	using NodeInput::NodeInput;

private:
	NodeInputHigh(const NodeInputHigh *) : NodeInput() {}
	constexpr static const char * type = "input_high";
	static NodeInputHigh instance;
};