MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / parse

Method parse

simcore/framework/src/cli/cli.hpp:5704–5715  ·  view source on GitHub ↗

Parses the command line - throws errors. This must be called after the options are in but before the rest of the program.

Source from the content-addressed store, hash-verified

5702 /// Parses the command line - throws errors.
5703 /// This must be called after the options are in but before the rest of the program.
5704 void parse(int argc, const char *const *argv) {
5705 // If the name is not set, read from command line
5706 if (name_.empty() || has_automatic_name_) {
5707 has_automatic_name_ = true;
5708 name_ = argv[0];
5709 }
5710
5711 std::vector<std::string> args;
5712 args.reserve(static_cast<std::size_t>(argc) - 1);
5713 for (int i = argc - 1; i > 0; i--) args.emplace_back(argv[i]);
5714 parse(std::move(args));
5715 }
5716
5717 /// Parse a single string as if it contained command line arguments.
5718 /// This function splits the string into arguments then calls parse(std::vector<std::string> &)

Callers 15

upgrade_sensor.pyFile · 0.45
ReadJsonDocFromStringFunction · 0.45
ExecuteCmdMethod · 0.45
ParseActionFromStrToJsonFunction · 0.45
Wstr2JsonMethod · 0.45
SensorGroupSaveMethod · 0.45
SensorGroupDeleteMethod · 0.45
DynamicLoadMethod · 0.45
DynamicSaveMethod · 0.45
DynamicDeleteMethod · 0.45
StartExeMethod · 0.45
InsertScenesMethod · 0.45

Calls 11

split_program_nameFunction · 0.85
find_and_modifyFunction · 0.85
split_upFunction · 0.85
clearFunction · 0.85
reserveMethod · 0.80
emplace_backMethod · 0.80
trimFunction · 0.50
emptyMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 6

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
xml_syntaxMethod · 0.36