Print all options from a list of already parsed options.
510 const vector< po::basic_option<char> >& options = parsed.options;
521 for (
unsigned i=0;
i<options.size(); ++
i)
523 const po::basic_option<char> &opt = options[
i];
525 if (opt.value.size()>0 && opt.string_key[0]!=
'-')
526 Max(maxlen, opt.string_key.length());
529 cout.setf(ios_base::left);
532 for(
unsigned i=0;
i<options.size(); ++
i)
534 const po::basic_option<char> &opt = options[
i];
536 if (opt.value.size()==0 && opt.string_key[0]!=
'-')
538 cout << setw(maxlen) << opt.string_key;
539 if (opt.value.size()>0)
540 cout <<
" = " << opt.value[0];
548 if (opt.position_key>=0)
549 com <<
" [position=" << opt.position_key <<
"]";
550 if (opt.unregistered)
551 com <<
" [unregistered]";
553 if (!com.str().empty())
554 cout <<
" # " << com.str();
static void Max(int &val, const int &comp)
Helper function which return the max of the two arguments in the first argument.