
On 23 February 2010 13:53, Robert Ramey
The code above doesn't describe how I was going to achieve that, but basically I was going to delegate the serialization of modules, something like
void load(ar, modules, version) { string module_name; ar << module_name; ModuleManager::load_if_possible(config.module, module_name); }
maybe a better option would be to include several archives in one stream.
class header { typedef std::pair
module std::list<module> m_list; }; void load(stream s, modules, version){ header h; { xml_archive xa(s); ar >> h; } foreach(module m in h){ xml_archive xa(s); if(m.:module_type is in modules) xar >> ? else // skip ahead in stream }
I like this idea! So the result will look like (eg) 10 XML files all mashed together, with 10 XML headers in the one file? That makes it an invalid XML file, right? Which is ok for my purposes, at the moment. thanks, Paul