Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-16 02:54:00


Hi Jonathan,

> I was asking for something like:
> value<type>(&variable)->default_value(default,"displayed version of
> default","displayed version of argument type")
> which would give
> -option: displayed version of argument type (=displayed version of
> default)
>
> Although,
> ->type_text("displayed version of argument
> type")->default_value(default)->default_text("displayed version of
> default")
>
> might be considered more legible. I prefer the existing positional
> arguments overload (the meaning should be obvious from context as well
> as library documentation, and remember, you'll be typing many of these
> options)

There's another possibility:

   value<type>(&variable, "filename")->......

something like that was in the pre-review version, with the difference that
the value name was also used to specify flags, e.g "filename?" would mean
the value is optional.

I'll add it to my todo. I techically could add this feature right now, but
I'd like all non-critical changes to have some "soak time" because adding
to CVS.

> Also, I'm not sure why 0-argument items couldn't appear in a config
> file. I declare the number of arguments used by options before I parse
> the config file, after all.

Because the current config parser, systantically, requires that everything
specified there has a value. If you specify that an option accepts no
explicit value, it can't be present in config file.

- Volodya


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