program_options question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

program_options question

Santosh Joseph

If I have an option that looks like this:
options_description desc("options");
desc.add_options()("server,s",value<string>(&server),"");

I know this can parse the following options:
--server arg
-s arg
but how can I also parse the following automatically:
-server arg
/server arg

Is there a style flag to set?  I looked at the
documentation but I'm a little confused by all the
style_t flags.

or do I have to write a "additional parser"?

thanks,
-Santosh
btw: i'm using 1.33.1


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: program_options question

Olaf van der Spek-2
On 4/19/06, Santosh Joseph <[hidden email]> wrote:

>
> If I have an option that looks like this:
> options_description desc("options");
> desc.add_options()("server,s",value<string>(&server),"");
>
> I know this can parse the following options:
> --server arg
> -s arg
> but how can I also parse the following automatically:
> -server arg
> /server arg
>
> Is there a style flag to set?  I looked at the
> documentation but I'm a little confused by all the
> style_t flags.

Looks like the allow_long_disguise and allow_slash_for_short flags should do.
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users