#include <vector>
#include "CalcLibData.h"

using namespace std;

typedef vector<CalcLibData> DATAVECTOR;
typedef vector<double> DOUBLEVECTOR;
typedef vector<COleDateTime> DATEVECTOR;

class CalcLibCalc
{
private:
	int m_status;
protected:
	DATAVECTOR m_input;
	DATAVECTOR m_output;
public:
	int getStatus() { return m_status; }
	void initValues(DOUBLEVECTOR, DATEVECTOR);
	void initValues(DOUBLEVECTOR values);
	virtual int doCalc() = 0;	
	DATAVECTOR getResults() { return m_output; }
	CalcLibData getOutputPointByIndex(int);
	CalcLibData getOutputPointByDate(COleDateTime);
	bool getFirstDefinedPoint(CalcLibData &d);
	int getFirstDefinedPointIndex();
	int getOutputLength() { return m_output.size(); } ;
	int getInputLength() { return m_input.size(); } ;

	inline int getOK() { return 1; }
	inline int getBad() { return -1; }
};
