5

I can see no way to support positional command line arguments with Poco's Poco::Util::Application class and related Poco::Util::OptionProcessor. Positional arguments are unnamed arguments on the command line, coming at the end after all other options, as such:

someprogram -b --what=121 filename.bin

In that example, filename.bin is a positional argument, it has no name, but is the first positional argument after all named arguments. Boost's program_options supports this, and I find it hard to believe Poco does not, but I can't discover how to support it given the source and documentation.

Does Poco support this?

Christian Severin
  • 1,793
  • 19
  • 38
Louis Marascio
  • 2,629
  • 24
  • 28

1 Answers1

5

I'm not familiar with Poco, but looking at the documentation, I suspect that the intended usage is to repeatedly call Poco::Util::OptionProcessor::process() on successive elements of argv until it returns false, and that would then signify the start of positional arguments and let you handle them however you wish.

jamesdlin
  • 81,374
  • 13
  • 159
  • 204
  • 1
    Looks like you're right, except I don't need to re-call process(). When the main method is invoked the only arguments left are positional. – Louis Marascio Sep 13 '10 at 23:32