Boost logo

Boost Users :

Subject: Re: [Boost-users] program_options hierarchical options
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-11-09 03:00:53


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.

- Volodya


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