MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / Parse

Method Parse

deps/glomap/glomap/controllers/option_manager.cc:281–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281void OptionManager::Parse(const int argc, char** argv) {
282 config::variables_map vmap;
283
284 try {
285 config::store(config::parse_command_line(argc, argv, *desc_), vmap);
286
287 if (vmap.count("help")) {
288 std::cout << "The following options can be specified via command-line:\n"
289 << *desc_;
290 // NOLINTNEXTLINE(concurrency-mt-unsafe)
291 exit(EXIT_SUCCESS);
292 }
293
294 vmap.notify();
295
296 } catch (std::exception& exc) {
297 LOG(ERROR) << "Failed to parse options - " << exc.what() << ".";
298 // NOLINTNEXTLINE(concurrency-mt-unsafe)
299 exit(EXIT_FAILURE);
300 } catch (...) {
301 LOG(ERROR) << "Failed to parse options for unknown reason.";
302 // NOLINTNEXTLINE(concurrency-mt-unsafe)
303 exit(EXIT_FAILURE);
304 }
305}
306
307} // namespace glomap

Callers 2

RunMapperFunction · 0.80
RunMapperResumeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected