简体   繁体   中英

Does the Poco C++ Library Support positional command line arguments?

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?

我对Poco不熟悉,但是在查看文档时,我怀疑预期的用法是在argv连续元素上重复调用Poco::Util::OptionProcessor::process() ,直到返回false ,然后表示位置参数的开始,让您随心所欲地处理它们。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM