#include <iostream>
#include <fstream>
#include <string>
#include <DXUT.h>
#include <vector>

using namespace std;

class Util
{
	public:
	static Util* instance; 
	static bool fileExists(string filename);
	static wstring stringToUnicode(string convert);
	static string Util::intToString(int integer, int minDigits);
	static string Util::floatToString(float value); 
	static float Util::stringToFloat(string input); 

	void getDataFromFile(vector<vector<D3DXVECTOR3>>* data, vector<float>* time);
	void writeToFile(std::vector<float> record_time, std::vector<std::vector<D3DXVECTOR3>> record_data);
	void splitString(string const& line, const char delimiter, std::vector<std::string>* buffer); 
	
	fstream file; 
	
	static Util* getInstance(void) {
	if(!instance)
		instance = new Util();
	
	return instance;
	}
};
