Boost logo

Boost Users :

Subject: Re: [Boost-users] program_options hierarchical options
From: Yang Zhang (yanghatespam_at_[hidden])
Date: 2009-11-09 05:04:59


On Mon, Nov 9, 2009 at 12:00 AM, Vladimir Prus
<vladimir_at_[hidden]> wrote:
> Yang Zhang wrote:
>
>> Is there an example of using program_options to build a hierarchical
>> options parser (a la svn, apt-get, git, etc.), in which earlier
>> options select parsers for later options?
>
> SVN option parsing do not, in fact, select parsers for later options.
> There's a single global set of options, it's just the first positional
> token that is taken to mean 'command', and for each command, and additional
> check is performed that only options that are relevant for that command
> are specified. Such check has to be done manually with the current
> version of program_options -- but does not seem a hard thing to do.

Then forget svn and consider git. I was just pulling an arbitrary
example; the particular example wasn't the focus. The question
remains.

-- 
Yang Zhang
http://www.mit.edu/~y_z/

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net