MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / ReadCommandLineOptions

Method ReadCommandLineOptions

src/FactorGraphConfig.cpp:432–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430 }
431
432 bool FactorGraphConfig::ReadCommandLineOptions(const int argc, char** argv, std::vector<std::string> * const Arguments)
433 {
434 /** assign all arguments to string vector*/
435 std::vector<std::string> Args;
436 Args.assign(argv+1, argv + argc);
437
438 if(Arguments != nullptr)
439 {
440 *Arguments = Args;
441 }
442
443 if (Args.size() >= 3)
444 {
445 ConfigFile = Args.at(0);
446 InputFile = Args.at(1);
447 OutputFile = Args.at(2);
448
449 /** parse yaml options if there are no other command line options */
450 if(Args.size() == 3)
451 {
452 return ReadYAMLOptions(ConfigFile);
453 }
454 else
455 {
456 return true;
457 }
458 }
459 else
460 {
461 PRINT_WARNING("Number of Arguments doesn't match standard convention [ConfigFile InputFile OutputFile]! It is: ", Args.size());
462 return false;
463 }
464 }
465}

Callers 4

mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls