Subject: [boost] Library for configuration file parsing
From: Denis Shevchenko (for.dshevchenko_at_[hidden])
Date: 2010-11-25 11:59:26
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,
Host = 127.0.0.1
Code for work with this config:
configurator.add_option( "Host" );
configurator.parse( "/some/path/to/simplest.conf" );
std::cout << "Value of host: " << configurator.get_value( "Host" )<<
- Allows to set option's default value or/and necessity.
- Allows to use arbitrary nesting of sections.
- Provides "standard" checks of value's semantic, like correct path, IP
validity, email correctness, etc.
- Provides "extended" checks of value's semantic, like time period and
- Provides common checks of options and sections, like duplication,
- Supports single-line and multi-line comments (in C++ style).
- Allow to register values with multi-values.
- Allows to set another "name-value" separator (including space symbol),
instead default '='.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk