Initial circuit.

This commit is contained in:
James Grogan 2023-01-03 07:47:49 +00:00
parent ab3ffc77dc
commit 1dfbcc61c4

View file

@ -3,19 +3,58 @@
#include <memory>
#include <vector>
class Terminal
class CircuitElement
{
};
class Terminal : public CircuitElement
{
public:
enum class Type
{
INPUT,
OUTPUT
};
Terminal(Type type)
: mType(type)
{
}
private:
double mValue{0};
Type mType;
};
class Wire
{
public:
Wire(CircuitElement* input, CircuitElement* output)
: mInput(input),
mOutput(output)
{
}
private:
CircuitElement* mInput{nullptr};
CircuitElement* mOutput{nullptr};
};
class LogicGate
{
public:
enum class Type
{
NOT,
AND,
OR,
XOR,
};
};
class ElectronicCircuit