| 404 | |
| 405 | |
| 406 | void SingleCommandOption::SetAlias(const std::string &optalias) |
| 407 | { |
| 408 | if (!alias.empty()) |
| 409 | { |
| 410 | throw CommandException(alias, "Alias already registered"); |
| 411 | } |
| 412 | |
| 413 | alias = optalias; |
| 414 | |
| 415 | // Initialise a separate struct option for the alias |
| 416 | getopt_alias.name = strdup(alias.c_str()); |
| 417 | getopt_alias.flag = NULL; |
| 418 | getopt_alias.has_arg = getopt_option.has_arg; |
| 419 | getopt_alias.val = 0; |
| 420 | } |
| 421 | |
| 422 | |
| 423 | std::string SingleCommandOption::get_option_list_prefixed() |
no test coverage detected