stuff-from-scratch/plugins/circuits/ElectronicCircuit.h
2023-01-03 07:47:49 +00:00

63 lines
679 B
C++

#pragma once
#include <memory>
#include <vector>
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
{
};