[program options] & also an apology to the list...
...for my earlier grumpy email about program_options. i'm was wanting to pass some sequences to some options using boost::program_options. something like: [me@here ~]$program --opt1 1 2 3 4 --opt2 5 6 7 8 --opt3 xxx yyy zzz if i use desc.add_options("opt1", value< vector<string> >()->multitoken(), "...") i get all the tokens to the end of the line. can i make multitoken() stop eating tokens by recognizing a syntactic element; either an option specifier or a token it can't interpret as a required type? can i inherit from the value_semantic class to read multiple tokens maybe? this whole library is very interesting but subtle. i do better when i can read examples of working code. does anyone know a more extensive discussion of it besides the distibution docs? ...which are great by the way! cheers jono
It would probably be easier to diagnose your problem if you post an
entire code example that reproduces the problem.
Chris
On 6/10/07, jono
...for my earlier grumpy email about program_options.
i'm was wanting to pass some sequences to some options using boost::program_options. something like:
[me@here ~]$program --opt1 1 2 3 4 --opt2 5 6 7 8 --opt3 xxx yyy zzz
if i use
desc.add_options("opt1", value< vector<string> >()->multitoken(), "...")
i get all the tokens to the end of the line.
can i make multitoken() stop eating tokens by recognizing a syntactic element; either an option specifier or a token it can't interpret as a required type? can i inherit from the value_semantic class to read multiple tokens maybe?
this whole library is very interesting but subtle. i do better when i can read examples of working code. does anyone know a more extensive discussion of it besides the distibution docs? ...which are great by the way!
cheers jono
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Chris Weed
-
jono