#include <cxxopts.hpp>
Go to the source code of this file.
|
cxxopts::ParseResult | parse (int argc, char *argv[]) |
|
◆ parse()
cxxopts::ParseResult parse |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 14 of file opt_parser.cpp.
16 cxxopts::Options options(
17 argv[0],
"Structure calculations for molecular simulations");
18 options.positional_help(
"[optional args]").show_positional_help();
19 options.allow_unrecognised_options().add_options()(
20 "c,config",
"Yaml Config",
21 cxxopts::value<std::string>()->default_value(
"conf.yml"))
23 (
"h,help",
"Print help");
24 auto result = options.parse(argc, argv);
26 if (result.count(
"help")) {
31 if (result.arguments().size() == 0) {
35 }
catch (
const cxxopts::OptionException &e) {