mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.TCore: DoubleXml / XmlDouble utility functions
git-svn-id: svn://ultimatepp.org/upp/trunk@2753 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
8820cb8012
commit
2f8c895f51
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue