From: JD (jean.daniel.michaud_at_[hidden])
Date: 2007-08-13 14:27:02
David Abrahams wrote:
> on Thu Aug 02 2007, JD <jean.daniel.michaud-AT-gmail.com> wrote:
>> Hi all,
>> I wrote a little command line interpreter based on the program option
>> library by Vladimir Prus. You can find it here:
>> It's not a big thing but can help sometime.
>> You also have the subversion repository there:
>> Let me know what you think.
> Hi JD,
> I don't think you can expect anyone here to crawl through your source
> code or open a zip file without first having some idea what your code
> does. I suggest posting some examples, right in your email message,
> and making the docs available online.
But they are... Just click on the link above and you have an example :)
And if load a web page is really too much, here is what you will find:
namespace po = boost::program_options;
void handler(const std::vector<std::string> ¶meters)
for (std::vector<std::string>::const_iterator it = parameters.begin();
it != parameters.end();
std::cout << *it << std::endl;
void exit_(unsigned int code = 0)
int main(int argc, char **argv)
("handler", po::value< std::vector<std::string>
("exit", po::value< unsigned int >()->notifier(&exit_))
boost::cli::command_line_interpreter cli(desc, ">");
error: required parameter is missing in 'handler'
>handler 1 2 3
error: unknown option toto
Press any key to continue . . .
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk