#pragma once
#include "AbstractSimulator.h"
#include "SimulationParametersDTO.h"
#include "SimulationControllerFacade.h"
#include "AbstractAction.h"


class SimulationController :
	public SimulationControllerFacade
{
private:
	AbstractSimulator* _simulator;
	bool continuousSimulation;
	static SimulationController* _instance;
	SimulationParametersDTO* _simulationParametersDTO;
	AbstractSimulationResultDTO* _simulationResult;
public:
	void SimulationControllerFacade::executeAction(AbstractAction* action);
	void startSimulation(bool continuous, int numberOfSimulations);
	void setSimulator(AbstractSimulator *simulator);
	bool stepSimulation();
	void stepSimulation(int stepTime);
	void stopSimulation();
	AbstractSimulationResultDTO* SimulationControllerFacade::getSimulationResult();
	void setSimulationResult(AbstractSimulationResultDTO* simulationResult);
	void setSimulationParametersDTO(SimulationParametersDTO *simulationParametersDTO);

	static SimulationController* instance() {
	if(!_instance)
	{
		_instance=new SimulationController();
	}
	return _instance;
	}
};