Boost logo

Boost :

Subject: Re: [boost] Library for configuration file parsing
From: Denis Shevchenko (for.dshevchenko_at_[hidden])
Date: 2010-11-26 06:11:20

On 26.11.2010 13:04, Vladimir Prus wrote:
> Denis Shevchenko wrote:
>> Hi all!
>> Is there any interest in a library for configuration file parsing?
>> I know there is a good library Program_options, but it supports (asit is
>> written in the documentation) "parsing of simple INI-like configuration
>> files". If all you need for configure your programs is INI-like files -
>> use Program_options and forget about this letter. But if you want to use
>> a more complex configuration files, you may be interested in my library,
>> Configurator.
> You might want to clarify what are "more complex configuration files".
> Also, note that the property_tree library has support for some flavour(s)
> of configuration files, so you might want to compare your solution with
> it.
> - Volodya
> _______________________________________________
> Unsubscribe& other changes:
Hi, Volodya!

This is example of more complex configuration file:
  * more_complex.conf

DbName : my_database
DbHost : localhost
DbPort : 100
DbUser : some_user
DbPassword : some_password

     Host : // IP semantic may be check.
     Port : 1080 // Value must be
unsigned integer number.
     Admin/*this is comment with unnecessary info
     asf*/istrator : admin_at_[hidden] // e-mail semantic
may be check.

     StorePath : /some/path // path
semantic may be check.

         Logfile : /some/path/to/logfile // path
semantic may be check.
         MaxLogFileSize : 10 MB // size
semantic may be check, result in bytes.

     ReconnectPeriod : 10 m // time-period semantic may be check,
result in seconds.

     plugins : a_plug b_plug
     plugins : c_plug
     plugins : d_plug
     plugins : e_plug

I know boost::property_tree, this is very good library, but (imho) it is
designed specifically to advanced work with XML (though not only with
him). In other words, primaryarea of this library is notwork with
configuration files(imho). I could not find in the documentation (or in
examples) of boost::property_tree features such as option's default
value or necessary.

My library designed exactly for work with configuration files and not
for anything more, so it usageis very simple for THIS task.

Boost list run by bdawes at, gregod at, cpdaniel at, john at