Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2003-01-15 13:24:20


Now about config file feature.

I have 2 major issues with your design.

1. You again placed 2 eggs into same basket.
   There are 2 levels of configuration file reading
    a) level that is responsible for comments lines, empty lines, continued
lines, include, ifdef, defines and so on
    b) level that is responsible for variable definition in configuration
file

One may want to use only first level and it's configuration is supplied as
XML

2. Look closely on config_file interface:
    operator++,
    operator bool

Does not it look like something familiar?
I have a solution based in iterator_adaptor that present iterator interface:
config_file_iterator that manage level a) of configuration reading. It's
very flexible and allows you to configure almost every part of it's logic.
For example comment char, line continuation char and so on.
I also have a solution that works based on config_file_iterator -
parameter_handling. It allows to access multi level (with namespaces and sub
namespaces) parameters defined in config file.

I may be able to present it as an alternative to your config_file class. But
it will take some tome to boostify.

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk