U++ framework
Do not panic. Ask here before giving up.

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: 14290
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 Apr 26 09:27:32 GMT+2 2026

Total time taken to generate the page: 0.00557 seconds