Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Xmlize and double
Re: Xmlize and double [message #741 is a reply to message #739] Mon, 30 January 2006 11:53 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
Well, we should definitely add "xmlizers" for "double":

template<> inline String XmlAttrStore(const double& var)
{
return AsString(var);
}

template<> inline void XmlAttrLoad(double& var, const String& text)
{
CParser p(text);
if(p.IsDouble()) var = p.ReadDouble();
}

template<> inline
void Xmlize(XmlIO xml, double& var)
{
xml.Attr("value", var);
}

In fact, it is just my ommision that I forgot to have them in Xmlize. They are now there...

This also shows one convenient way how convert String to double...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: signature of the stou function
Next Topic: Serbian translation
Goto Forum:
  


Current Time: Sun Aug 24 21:50:25 CEST 2025

Total time taken to generate the page: 0.00493 seconds