#include <user_info.h>
Public Member Functions | |
| UI_File (const string &file_name) | |
| attach new RootElement instance to a file (typically with an XML extension) | |
| void | load () |
| loads root element from a file | |
| void | save () |
| save UserInfo to the file (typically with an XML extension) | |
| operator Setting & () | |
Firstly, you associate new RootElement instance with some filename during a time of its construtcion. Then, you save some object into the new RootElement instance, and save it into the file this way:
CAudi audi;
RootElement root("cars.xml");
UserInfo::save( audi, root, "TT");
root.save();
In the other way round, when loading object from a XML file, the appropriate code looks like this:
RootElement root("cars.xml"); root.load(); UserInfo::build<T>(root,"TT");
1.5.8