Commit 6c0e3cda authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Ainur: string and integer types reworked

parent 77fff659
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -9,6 +9,26 @@ namespace PsimagLite {

struct MyProxyFor {

	static void convert(long unsigned int& t, std::string str)
	{
		t = PsimagLite::atoi(str);
	}

	static void convert(unsigned int& t, std::string str)
	{
		t = PsimagLite::atoi(str);
	}

	static void convert(long int& t, std::string str)
	{
		t = PsimagLite::atoi(str);
	}

	static void convert(int& t, std::string str)
	{
		t = PsimagLite::atoi(str);
	}

	static void convert(double& t, std::string str)
	{
		t = PsimagLite::atof(str);
@@ -25,6 +45,11 @@ struct MyProxyFor {
		t = toComplex<T>(str);
	}

	static void convert(String& t, std::string str)
	{
		t = str;
	}

	template<typename T>
	static void convert(T& t, std::string str)
	{