MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / setArgument

Method setArgument

src/server/sarge.cpp:23–39  ·  view source on GitHub ↗

--- SET ARGUMENT ---

Source from the content-addressed store, hash-verified

21
22// --- SET ARGUMENT ---
23void Sarge::setArgument(std::string arg_short, std::string arg_long, std::string desc, bool hasVal) {
24 std::unique_ptr<Argument> arg(new Argument);
25 arg->arg_short = arg_short;
26 arg->arg_long = arg_long;
27 arg->description = desc;
28 arg->hasValue = hasVal;
29 args.push_back(std::move(arg));
30
31 // Set up links.
32 if (!arg_short.empty()) {
33 argNames.insert(std::pair<std::string, Argument*>(arg_short, args.back().get()));
34 }
35
36 if (!arg_long.empty()) {
37 argNames.insert(std::pair<std::string, Argument*>(arg_long, args.back().get()));
38 }
39}
40
41
42// --- SET ARGUMENTS ---

Callers 1

mainFunction · 0.45

Calls 3

push_backMethod · 0.80
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected