MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / addParameter

Method addParameter

source/core/StarOptionParser.cpp:23–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void 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
28void OptionParser::addArgument(String argument, RequirementMode requirementMode, String description) {
29 m_arguments.append(Argument{std::move(argument), requirementMode, std::move(description)});

Callers 6

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 2

formatFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected