Do Poco C ++ command line arguments support command line parameters?

I see no way to support command line positional arguments with the Poco class Poco::Util::Application and its associated Poco::Util::OptionProcessor. Positional arguments are unnamed command line arguments that end after all other parameters:

someprogram -b --what=121 filename.bin

In this example, filename.bin is a positional argument, it does not have a name, but it is the first positional argument after all named arguments. Boost program_options supports this, and it's hard for me to believe that Poco doesn't, but I can't figure out how to maintain it based on the source and documentation.

Does Poco support this?

+5
source share
1 answer

I am not familiar with Poco, but looking at the documentation, I suspect that the intended use is to re-name Poco::Util::OptionProcessor::process()on consecutive elements argvuntil it returns false, and that would mean starting positional arguments and letting you handle them as you please .

+5
source

All Articles