On Fri, 20 Aug 2004 20:55:18 +0200
 Mathias Fröhlich <[EMAIL PROTECTED]> wrote:
On Freitag, 20. August 2004 18:48, Jon S Berndt wrote:
Can someone tell me what the process is once a file has been opened
and is being parsed by EasyXML? What do the callbacks do ... what is
the standard procedure for reading in the attibutes and elements and
data?
See:

http://www.simgear.org/doxygen/easyxml_8hxx.html

It is a quite neat implementation.

And I think that using integrating this provides is a good chance to seperate configuration data from state data.

Yes, I've seen that page. I've written (now) two applications that use the EasyXML class, and it is a very nice (and Easy) class to use. With the plotting application, it was not too difficult to use it (even if I did so incorrectly). There was one class that was subclassed from XMLVisitor, and it included all the plotting parameters I needed.


However, in the case of JSBSim, there are now several classes that read in data from the configuration file (FGFDMExec does the initial read, and hands off the config file handle to other classes to let them read in their own data). The Aerodynamics, MassBalance, Aircraft, Output, etc. classes currently all read in their own data from the configuration file.

Today, I have written a class that parses JSBSim format config files. Within the callbacks I simply echo the information read from the files. Currently, FGXMLParser (the name of the potential new class to replace FGConfigFile) can parse the config file, but then the question is: what do I do, now. Remember, currently in JSBSim each file reads in its own data as the config file class encounters the relevant sections in the config file. With FGXMLParser we have callbacks - this is philosophically different from FGConfig File.

So, my question is: What is the philosophy behind loading various classes with their own data from the config file using EasyXML callbacks?

Jon

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to