|
Boost Users : |
From: The Grumpiest Man You Know (mrgrumpyguts_at_[hidden])
Date: 2005-02-20 00:55:51
As context I would like to say that read "The C++ Programming
Language" first edition and thought, "That sounds interesting." and
then didn't think of it again 'til about a a couple of months ago,
when I read Accelerated C++ on the recommendation of a friend and then
updated my original copy to the third edition. So I have NO useful
C++ experience, please point out even the most obvious things, I
really could be that dumb. I have started a non trivial project that
I hope will cement some of the things I've read. And that's where
boost comes in.
I had some success with using boost_filesystem, so I think I am able
to extract basic usage out of the documentation but I've failed to
find what I'm looking for in program_options.
I would really like to parse a line that has the the form:
word [options]... nother option-like-non-option-word...
so for instance -F after "word" indicates a legitimate value but -F
after "nother" shouldn't set or change the value and indeed might not
even have a "value"
I've been considering producing a class defining operator() to be used
as an additional parser that would recognize the second bare word and
make all options thereafter into some list for a dummy option, like
the file names in the example.
However there is mention of allowing multi word options being "not
enabled by default" and I thought that the style argument might be
the key, but what I've managed to work out from reading a tarball I
downloaded of 1_32_0 seems to use style for changing how single words
are interpreted.
So before I go crazy trying to implement something that sounds easy to
say but beyond my ken, is there a method I'm overlooking for
terminating the parsing of the command line before the words are all
consumed?
Thanks for your time, I'll try to be more brief in future. :)
-- Blue Skies
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