Boost logo

Boost Users :

Subject: Re: [Boost-users] program_options, multiple [sections] from a config file
From: Daniel Bradburn (moagstar_at_[hidden])
Date: 2010-07-28 03:23:28


Perhaps you could take a look at Boost.PropertyTree which will enable you to parse this kind of .ini file (also xml and a number of other formats):
http://www.boost.org/doc/libs/1_43_0/doc/html/property_tree.html
This will give more flexibility about specifying about parsing options without having to specify beforehand which options to expect.

> Date: Tue, 27 Jul 2010 18:48:53 -0700
> From: richard.ringo.langly_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: [Boost-users] program_options, multiple [sections] from a config file
>
>
> I'm using boost program_options 1.41 and would like to know if anyone has a
> better idea than what I'm trying to do. I am reading from a config file some
> basic parameters per section, but I have multiple sections. The problem is
> there could be any number of [sections] in this file, so I don't know what
> it is ahead of time.
>
> [server]
> name="a"
> ip="1.2.3.4"
>
> [server_2]
> name="b"
> ip="4.5.6.7"
>
> [server_3]
> name="c"
> ip="8.9.0.1"
>
>
> Thanks,
>
>
> --
> View this message in context: http://old.nabble.com/program_options%2C-multiple--sections--from-a-config-file-tp29282201p29282201.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
                                               
_________________________________________________________________
Een netbook met Windows 7? Hier vind je alles dat je moet weten.
http://www.windows.nl/netbook



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