| 421 | |
| 422 | |
| 423 | std::string SingleCommandOption::get_option_list_prefixed() |
| 424 | { |
| 425 | std::stringstream r; |
| 426 | |
| 427 | if (0 != shortopt) |
| 428 | { |
| 429 | r << "-" << shortopt; |
| 430 | } |
| 431 | if (!longopt.empty()) |
| 432 | { |
| 433 | if (r.tellp() != std::streampos(0)) |
| 434 | { |
| 435 | r << " "; |
| 436 | } |
| 437 | r << "--" << longopt; |
| 438 | |
| 439 | if (optional_argument == getopt_option.has_arg) |
| 440 | { |
| 441 | r << " --" << longopt << "="; |
| 442 | } |
| 443 | } |
| 444 | if (!alias.empty()) |
| 445 | { |
| 446 | if (r.tellp() != std::streampos(0)) |
| 447 | { |
| 448 | r << " "; |
| 449 | } |
| 450 | r << "--" << alias; |
| 451 | if (optional_argument == getopt_alias.has_arg) |
| 452 | { |
| 453 | r << " --" << alias << "="; |
| 454 | } |
| 455 | } |
| 456 | return r.str(); |
| 457 | } |
| 458 | |
| 459 | |
| 460 | std::string SingleCommandOption::call_argument_helper_callback(const std::string &opt_name) |
no test coverage detected