Boost logo

Boost :

From: Janusz Piwowarski (jpiw_at_[hidden])
Date: 2004-03-22 03:55:15


Hello

> > I try to use program_options for single config file, with
> > options_description where all options are mapped to variables (
> > value<T>(&variable)->default_value(x) ). For now, i must use extra
> > variable_map, it's possible to omit it?
>
> No -- I meant variables_map to be the primary interface. However, I think
that
> in your case, the only drawback is extra lines in the code. Or there's
> something else?
>
You're right.

> > And, second question, do you think about interface to create own
> > validators?
>> [...]
> If you want to customize the parsing, the current way is:
>
> 1. Declare some class derived from typed_value<YourType> and override the
> 'parse' method.
>
> 2. Specialize the 'value' function to return instance of your type.
>
It's it, thanks.

Janusz


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk