Boost logo

Boost Users :

From: Anselm Kunstein (kunstein_at_[hidden])
Date: 2005-05-02 09:53:57


I'm trying ro read a config file with the program_options library, but I
can't figure out how to read several sections in a config file whithout
knowing (the exact) section names.
For example I have a config file with N [blockn] sections (n=1...N) in
my config file but I don't know N:

name="Name section 1"
name="Name2 section 2"
# there might or might not be more sections with the 'name' option

Is there any support for wildcards in option names so I could write
something like

options_description Opts_Desc("Config-File Options");
Opts_Desc.add_options() ("*.name", value<string>(),
                "Name of the block");

or is there a workaround for this problem? Thanks a lot in advance,

Anselm Kunstein

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at