#include "stdafx.h"
#include "ActionFactory.h"
#include "StepSimulationAction.h"

AbstractAction* ActionFactory::createStartSimulatorAction(bool continuous, double avgTimeOfArrivals, double simulationTime, int numberOfSimulations)
{
	SimulationParametersDTO* simulationParametersDTO = new SimulationParametersDTO;
	simulationParametersDTO->setContinousSimulation(continuous);
	simulationParametersDTO->setAverageTimeOfArrivals(avgTimeOfArrivals);
	simulationParametersDTO->setNumberOfSimulations(numberOfSimulations);
	simulationParametersDTO->setTimeOfEachSimulation(simulationTime);
	StartSimulationAction* startAction = new StartSimulationAction();
	startAction->setSimulationParametersDTO(simulationParametersDTO);
	return startAction;
}

AbstractAction* ActionFactory::createStepSimulatorAction(int stepInterval)
{
	StepSimulationAction* stepAction = new StepSimulationAction();
	stepAction->setStepInterval(stepInterval);
	return stepAction;
}

AbstractAction* ActionFactory::createStopSimulatorAction()
{
	// TODO: Implement Method
	throw "Not Implemented Exception";
}
