RootElement Class Reference

This class serves to load and/or save DOMElements into/from files stored on a hard-disk. More...

#include <userinfo.h>

Collaboration diagram for RootElement:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 RootElement (const char *fileName)
 attach new RootElement instance to a file (typically with an XML extension)
bool Load (void)
 this method loads root element and all its subnodes from the attached file
void Save (void)
 this method saves all the previsoulsy attached DOMElements into the file
 operator DOMElement & ()
 this operator allows to use a RootElement instance whenever a DOMElement variable is accepted


Detailed Description

This class serves to load and/or save DOMElements into/from files stored on a hard-disk.

Firstly, you associate new RootElement instance with some filename during a time of its construtcion. Then, you disassembly some object into the new RootElement instance, and save it into the file this way:

        CAudi audi;
        RootElement root("cars.xml");
        UserInfo::Disassembly( 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::Assembly<T>(root,"TT");

Member Function Documentation

bool RootElement::Load ( void   ) 

this method loads root element and all its subnodes from the attached file

loads root element from a file

This DOMWriter is used to import external data from xml files

void RootElement::Save ( void   ) 

this method saves all the previsoulsy attached DOMElements into the file

Save UserInfo to the file (typically with an XML extension).


The documentation for this class was generated from the following files:

Generated on Wed Oct 15 15:57:16 2008 for mixpp by  doxygen 1.5.6