#ifndef __convert_sl_h
#define __convert_sl_h

#include <iostream>
#include <string>
#include <sstream>			// function StringToDouble

using std::string;
using std::istringstream;	// function StringToDouble
using std::stringstream;	// used by function Double2String(), Int2String()


namespace convert_sl
{

	// if a string is a char* then:
	//		sprintf(myString, "%d", myInt);
	// or:
	//		_itoa(myInt, myString, 10);

	//---------------------------------------------------------------------
	// Converting a string to an integer value
	int			StringToInt(string str);

	//---------------------------------------------------------------------
	// Converting a string to a double value
	double		StringToDouble (string s);

	//---------------------------------------------------------------------
	// Converting a double to a string value
	string		Double2String(double d);

	//---------------------------------------------------------------------
	// Converting a float to a string value
	string		Float2String(float f);

	//---------------------------------------------------------------------
	// Converting an integer to a string value
	string		Int2String(int i);


	//---------------------------------------------------------------------
	// Converting a date string 'YYYYMMDD' to three separate integer values
	void		Get_Date_Int(string date, int &year, int &month, int &day);

};

#endif /* __convert_sl_h */