From: Jason L. <jl...@me...> - 2002-10-28 15:22:36
|
Actually, the changes I committed to CVS last night broke the "writecommand" ability. Here's a summary of the changes I made and my reasoning: The name of the element defines the "type" of the node. The type of the node defines what parser to run. When libconfig4gnu encounters a node type it hasn't seen before it tries to dynamically load information about that type from the classes directory. For instance, when the node type of "inifile" is encountered, libconfig4gnu reads the config4gnu/data/classes/inifile.xml file and finds out that it needs to run parse.ini.pl to read configuration and unparse.ini.pl to write configuration. The reasoning for this is when a third party adds a new parser, they can add the parser to the parsers directory and add a "class definition file" to the classes directory. Then the user will be able to create a node of this new type from the UI, specifying the node type and location of the configuration file. Next we'll be able to create class definition files for specific applications. For instance, a class definition file for "groups" would extend the colonfile class, and define that the config file is /etc/group and it would define names, descriptions, and possibly default values for the different parameters. I still need to do the "writecommand" functionality. Jason Long |