#pragma once

#include <memory>
#include <vector>

#include "CircuitElement.h"
#include "LogicGate.h"
#include "Terminal.h"

using LogicGatePtr = std::unique_ptr<LogicGate>;

class ElectronicCircuit
{
public:
	void addInputTerminal(TerminalPtr terminal);

	void addOutputTerminal(TerminalPtr terminal);

	void addWire(WirePtr wire);

	void addLogicGate(LogicGatePtr gate);

	const std::vector<Terminal*>& getInputTerminals() const
	{
		return mInputTerminals;
	}

	const std::vector<Terminal*>& getOutputTerminals() const
	{
		return mOutputTerminals;
	}

	const std::vector<LogicGate*>& getLogicGates() const
	{
		return mLogicGates;
	}

	const std::vector<Wire*>& getWires() const
	{
		return mWires;
	}

private:
	std::vector<Terminal*> mInputTerminals;
	std::vector<Terminal*> mOutputTerminals;

	std::vector<Wire*> mWires;

	std::vector<LogicGate*> mLogicGates;

	std::vector<std::unique_ptr<CircuitElement> > mElements;
};
