.TCore: DoubleXml / XmlDouble utility functions

git-svn-id: svn://ultimatepp.org/upp/trunk@2753 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2010-10-07 08:39:26 +00:00
parent 8820cb8012
commit 2f8c895f51

View file

@ -1357,6 +1357,11 @@ void IntXml(StringBuffer& xml, const char *tag, int value)
xml << '<' << tag << '>' << value << "</" << tag << ">\n";
}
void DoubleXml(StringBuffer& xml, const char *tag, double value)
{
xml << '<' << tag << '>' << FormatDoubleExp(value, 16) << "</" << tag << ">\n";
}
void BoolXml(StringBuffer& xml, const char *tag, bool b)
{
xml << '<' << tag << '>' << (b ? "1" : "0") << "</" << tag << ">\n";
@ -1372,4 +1377,9 @@ int XmlInt(XmlParser& xml)
return ScanInt(xml.ReadTextE());
}
double XmlDouble(XmlParser& xml)
{
return ScanDouble(xml.ReadTextE());
}
END_UPP_NAMESPACE