Boost logo

Boost Users :

Subject: [Boost-users] [program_options] Parsing Config File
From: Christian Meesters (meesters_at_[hidden])
Date: 2010-02-25 07:40:34


Hi,

I'd like to use/abuse boost::program_options to parse a configuration
file like this:

[project1]
parameter=x
...
[project2]
parameter=y
...
[project3]
parameter=z
...
and so on. Point is that I cannot now how many 'project' entries there
will be in advance. Is there a way to parse this and retrieve a list of
project keys from boost::program_options::variables_map?

Or (the 'abuse' above already suggested that I'm not certain whether
this library is the most suited one) is there a better approach?

Christian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net