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 works only for storing
Re: Xmlize works only for storing [message #18464 is a reply to message #18454] Thu, 02 October 2008 09:08 Go to previous messageGo to previous message
exhu is currently offline  exhu
Messages: 12
Registered: April 2008
Location: Belarus
Promising Member
Quote:

Why don`t you use construction from Xmlize reference sample:


I can't use it because STL and other simple types already defined in the program do not contain Xmlize methods which are called by the template.

Changed to:

void ServData::Xmlize(XmlIO xml) {
    ::Xmlize(XmlIO(xml,"map"), locationMap);
    //XmlIO(xml, "magic").Attr("magic", magic);
    //magic = magic;
}

/////////


void Xmlize(XmlIO xml, Map & locMap) {
    xml.Attr("shopname", locMap.shopName);
    Xmlize(XmlIO(xml, "left"), locMap.left);    
    Xmlize(XmlIO(xml,"right"), locMap.right);
    Xmlize(XmlIO(xml,"top"), locMap.top);
    Xmlize(XmlIO(xml,"bottom"), locMap.bottom);
    
}


Now it works, but it's not obvious why because both Add() method and XmlIO() constructor use & (reference) for variable argument.

Who can explain this magic? No comments at all in the library sources Sad
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FindFile, get dir list
Next Topic: String reverse find
Goto Forum:
  


Current Time: Thu Aug 21 10:31:30 CEST 2025

Total time taken to generate the page: 0.05925 seconds