adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Config file stuff committed


From: ksterker
Subject: [Adonthell-devel] Config file stuff committed
Date: Thu, 13 May 2004 08:50:16 +0200

Hi all,

I have just committed the new configuration code. The classes defined in 
base/configuration.h contain the main functionality and low level stuff. 
base/configio.h contains a class that takes care of loading and saving. That 
means, configuration itself does not depend on libxml, so we could easily 
replace that part by simply providing different load/save routines. Not that 
this will be neccessary, but its cleaner that way.

There is a test script (/test/configtest.py), that shows the various features 
of the configuration code. It'll create a sample config file 
(~/.adonthell/adonthellrc) and do some further tests.


One point that is still open is the following: how can we notify the different 
modules whenever an option has changed. My idea is to allow each module to 
register a callback that is connected to a certain section of the configuration 
file. Whenever a change is made to that section, that callback is called. This 
would allow the module to re-read its configuration and make the neccessary 
adjustments. Perhaps, we can even pass the name of the option that has changed 
to the callback, so that a module does exactly know which option was changed in 
the first place.

Cheers,

Kai

P.S. Now I'll really concentrate on characters and all associated stuff. 

How's the mapengine going, Alex?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]