#pragma once
#include "LeafSimulationResult.h"
#include <vector>
using namespace std;

class ServiceInfoDTO: public LeafSimulationResult
{
public:
	void setID(string _serviceName);
	/*double getServiceAvgServiceTime();
	void updateServiceLife(double serviceTime);*/
	void updateQueue(int queueSize);
	double getServiceAvgQueueSize();
	int getServiceActualQueueSize();
	int getMaximumQueueSize();
	double getServiceUseRate();
	double getStandardDeviation();
	void calculateData();
	int AbstractSimulationResultDTO::getType();
	AbstractSimulationResultDTO* LeafSimulationResult::clone();
	string AbstractSimulationResultDTO::getID();
	ServiceInfoDTO(){
		numIterations = 0;
		serviceActualQueueSize = 0;
		maximumQueueSize = 0;
		serviceUseRate = 0;
		serviceTotalQueueSize = 0;
		numIterationsQueue = 0;
		queueSizes = new vector<int>();
		queueBusy = new vector<int>(); 
		avgQueueSize = 0;
		/*serviceTimes = new vector<double>();
		avgServiceTime = 0;
		serviceTotalServiceTime = 0;*/
	}
	ServiceInfoDTO(ServiceInfoDTO* oldCopy){
		numIterations = oldCopy->numIterations;
		serviceActualQueueSize = oldCopy->serviceActualQueueSize;
		maximumQueueSize = oldCopy->maximumQueueSize;
		serviceUseRate = oldCopy->serviceUseRate;
		serviceTotalQueueSize = oldCopy->serviceTotalQueueSize;
		numIterationsQueue = oldCopy->numIterationsQueue;
		queueSizes = oldCopy->queueSizes;
		avgQueueSize = oldCopy->avgQueueSize;
		serviceName = oldCopy->serviceName;
		queueBusy = oldCopy->queueBusy;
		/*serviceTimes = oldCopy->serviceTimes;
		avgServiceTime = oldCopy->avgServiceTime;
		serviceTotalServiceTime = oldCopy->serviceTotalServiceTime;*/
	}
private:
	static const int type = 4;
	string serviceName;
	double serviceTotalQueueSize;
	double avgQueueSize;
	int serviceActualQueueSize;
	int maximumQueueSize;
	double serviceUseRate;
	int numIterations;
	int numIterationsQueue;
	vector<int>* queueSizes;
	vector<int>* queueBusy;
	/*vector<double>* serviceTimes;
	double avgServiceTime;
	double serviceTotalServiceTime;*/
};