| 21 | } |
| 22 | |
| 23 | void OptionParser::addParameter(String const& flag, String argument, RequirementMode requirementMode, String description) { |
| 24 | if (!m_options.insert(flag, Parameter{flag, std::move(argument), requirementMode, std::move(description)}).second) |
| 25 | throw OptionParserException::format("Duplicate flag '-{}' added", flag); |
| 26 | } |
| 27 | |
| 28 | void OptionParser::addArgument(String argument, RequirementMode requirementMode, String description) { |
| 29 | m_arguments.append(Argument{std::move(argument), requirementMode, std::move(description)}); |