From a34402b79b38624a29ed8ea4e059af817266e6b8 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 3 Sep 2007 09:11:33 +0000 Subject: Implemented the first version of the XML request. Fixed eXpat incompatability with XML_Get/SetUserData and the void* in the handler functions. --- server/src/tostring.cc | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'server/src/tostring.cc') diff --git a/server/src/tostring.cc b/server/src/tostring.cc index e218a32..bde5498 100644 --- a/server/src/tostring.cc +++ b/server/src/tostring.cc @@ -30,12 +30,12 @@ #include -std::string Pentominos::toString(std::string s) +std::string toString(std::string s) { return s; } -std::string Pentominos::toString(char c) +std::string toString(char c) { char buf[32]; sprintf(buf, "%c", c); @@ -43,7 +43,7 @@ std::string Pentominos::toString(char c) return buf; } -std::string Pentominos::toString(unsigned char c) +std::string toString(unsigned char c) { char buf[32]; sprintf(buf, "%c", c); @@ -51,7 +51,7 @@ std::string Pentominos::toString(unsigned char c) return buf; } -std::string Pentominos::toString(short int si) +std::string toString(short int si) { char buf[32]; sprintf(buf, "%d", si); @@ -59,7 +59,7 @@ std::string Pentominos::toString(short int si) return buf; } -std::string Pentominos::toString(short unsigned int su) +std::string toString(short unsigned int su) { char buf[32]; sprintf(buf, "%u", su); @@ -67,7 +67,7 @@ std::string Pentominos::toString(short unsigned int su) return buf; } -std::string Pentominos::toString(int li) +std::string toString(int li) { char buf[32]; sprintf(buf, "%ld", li); @@ -75,7 +75,7 @@ std::string Pentominos::toString(int li) return buf; } -std::string Pentominos::toString(unsigned int lu) +std::string toString(unsigned int lu) { char buf[32]; sprintf(buf, "%lu", lu); @@ -83,13 +83,13 @@ std::string Pentominos::toString(unsigned int lu) return buf; } -std::string Pentominos::toString(bool b) +std::string toString(bool b) { if(b) return "true"; else return "false"; } -std::string Pentominos::toString(float f, unsigned int precision) +std::string toString(float f, unsigned int precision) { char buf[100]; char format[12]; @@ -100,7 +100,7 @@ std::string Pentominos::toString(float f, unsigned int precision) return ""; } -std::string Pentominos::toString(double d, unsigned int precision) +std::string toString(double d, unsigned int precision) { char buf[100]; char format[12]; @@ -110,7 +110,7 @@ std::string Pentominos::toString(double d, unsigned int precision) return buf; } -std::string Pentominos::toString(long double ld, unsigned int precision) +std::string toString(long double ld, unsigned int precision) { char buf[100]; char format[12]; @@ -141,17 +141,17 @@ int main() long double ld = 0.1; std::string str = - "[" + Pentominos::toString(s) - + "] [" + Pentominos::toString(c) - + "] [" + Pentominos::toString(uc) - + "] [" + Pentominos::toString(si) - + "] [" + Pentominos::toString(su) - // + "] [" + Pentominos::toString(li) - // + "] [" + Pentominos::toString(lu) - + "] [" + Pentominos::toString(b) - + "] [" + Pentominos::toString(f, 10) - + "] [" + Pentominos::toString(d, 18) - + "] [" + Pentominos::toString(ld, 36) + "[" + toString(s) + + "] [" + toString(c) + + "] [" + toString(uc) + + "] [" + toString(si) + + "] [" + toString(su) + // + "] [" + toString(li) + // + "] [" + toString(lu) + + "] [" + toString(b) + + "] [" + toString(f, 10) + + "] [" + toString(d, 18) + + "] [" + toString(ld, 36) + "]"; printf("%s\n", str.c_str()); -- cgit v1.2.3