Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2004-11-23 20:15:16


On Tue, 23 Nov 2004 15:42:40 -0600
Allen Bierbaum <allenb_at_[hidden]> wrote:

> From what I understand of the custom parsers, this just allows the
> developer to recognize addition options and options formats. This
> doesn't handle my case because what I want to do is ignore unknown
> options. (so they can be handled by a different method entirely).

Right. Hmmm...

I guess a <cough> "workaround" would be to return something like
std::make_pair(std::string("Internal Unhandled Parameters"), s) and then
you can have a vector of strings for "Internal Unhandled Parameters" and
your user callback can then invoke your third party call to parse those
options.

Ideally, you would the ability to write a custom parser that "handles"
the option, but does not return any information back to the library.

I am not familiar enough with the library to know the "correct" method.
The only thing I can think of is that the interface is lacking. I took
a few minutes to look at the code in
libs/program_options/src/cmdline.cpp and it looks like the only
interpretation is empty or a valid option name.

So, at this stage, I think it requires an interface change to support
this option.

I am, most likely, missing something in my very brief glance, so I guess
we need to wait for Vladimir to chime in with the real answer...


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