Subject: Re: [boost] [ANN] CLI command line interface compiler for C++
From: Boris Kolpackov (boris_at_[hidden])
Date: 2009-10-29 11:33:51
Olaf Peter <ope-devel_at_[hidden]> writes:
> looks interesting. is there an easy way to pass arguments to an
> underlying framework, e.g. Qt's QCoreApplication like -display, -font
> etc?, even it is not a valid option to the program self, which shall
> expect the classic form of long/short option e.g. --debug|-d ???
Yes, there are several ways to do this. I don't know if QCoreApplication
does this, but normally a subsystem like this would have a chance to
parse the argc/argv array first and remove all the options from argv
that are specific to it. As a result, your application doesn't see
any of the Qt options.
But even if QCoreApplication doesn't do this, you can instruct the
CLI-generated classes to ignore unknown options.
> Is it possible to write (as it can be done for boost.program_options)
> for gcc compiler's "-frtti" and -fno-rtti" without blowing up the DSL
> cli file?
There is no support for this at the moment though it can probably be
implemented. Something like this:
I've added this to the potential feature list to think about.
> Maybe generating the usage() from the DSL cli file with grouping of
> options like as it can be done by using boost.program_options?
Yes, providing options documentation in the .cli file and then generating
the usage information, man pages, etc. is on the TODO list for the next
-- Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog Open-source XML data binding for C++: http://codesynthesis.com/products/xsd XML data binding for embedded systems: http://codesynthesis.com/products/xsde
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk