Boost logo

Boost :

From: Hartmut Kaiser (hartmutkaiser_at_[hidden])
Date: 2003-05-21 11:39:22

Aleksey Gurtovoy wrote:

> The formal review of Vladimir Prus' Command Line & Config
> ("program_options") library starts today, May 21, and will
> continue until Monday, June 2nd. I will be serving as review manager.

I'll start with my conclusion: I think, that the program_options library
of Valdimir Prus should be accepted into Boost.

1. I've used the program_options lib for a while now in several of my
projects. It provides a very simple to use but nevertheless very
flexible and powerful solution for this everyday task.
It handles out of the box:

- arbitrary unix style (short and long options, i.e. '-' followed by a
letter and '--' followed by the option)
- arguments with no, one or more optional and one or more required
parameter(s) in a simple to handle manner
- allows to specify default parameter values
- allows to specify custom argument validators
- allows to specify custom notifiers for every argument
- generates meaningful and useful help output (which is customizable to
some extend too)

The supported argument format is customizable, this customization is
restricted to the most used unix style idioms.

I don't know, if it is possible to extend this to other styles too (as
using other characters as the option starting character, for instance
'+'), and if yes, how to achieve this.

2. The library supports to analyze command line style options (based on
argc, argv). I think it would be helpful to support the direct command
line syntax too (based on the command line string), even if this might
be system dependend.

3. The library supports to use configuration files as an alternative
means of supplying the options, but it is restricted to a windows like
INI format by now. It seems to be useful for me to support the same
option formatting, as allowed for the command line. Ok, this
implementation is very simple and straightforward - I had to do this for
the Wave preprocessor driver - but this feature should be useful in
other contexts too.

4. I was able to extend the library to support other argument styles
with little effort. It's simple a matter of supplying a custom parsing
function, which is called for every recognized argument.

5. The recognized options and values are accessible through a property
map like interface, which seems to be the right way, because it's
flexible and easy to understand. I found it to be very intuitive to use.

Last but not least I wanted to mention Volodya's great responsiveness,
which helped me a lot while getting my self accustomed with his library.

Regards Hartmut

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