
Ovanes Markarian wrote:
Hello *!
I would like to know if there is any interest to support hierarchical configuraitons in boost program options library.
The idea is mainly:
[Level1] Option1 Option2 Option3
[[Level2]] Option1 Option2 Option3
I think this syntax may be helpful, and should not harm anybody, so patches to support will be welcome.
Access rules would be: Level1.Option1 or Level1.Level2.Option1
Sometimes it is very useful to introduce an additional level instead of putting a prefix to each option. On the other hand it might be beneficial during access.
PSEUDOCODE: option_group g = parsed_options["Level1.Level2"].as
(); do_smth(g["Option1"]);
I've though about providing access to a specific set of options, probably on the level of variables_map, and probably making use of the property_tree library, but no concrete design yet. - Volodya