Loading...
Searching...
No Matches
Go to the documentation of this file.Code
18cxxopts::ParseResult
parse(
int argc,
char *argv[]) {
20 cxxopts::Options options(
21 argv[0],
"Structure calculations for molecular simulations");
22 options.positional_help(
"[optional args]").show_positional_help();
23 options.allow_unrecognised_options().add_options()(
24 "c,config",
"Yaml Config",
25 cxxopts::value<std::string>()->default_value(
"conf.yml"))
27 (
"h,help",
"Print help");
28 auto result = options.parse(argc, argv);
30 if (result.count(
"help")) {
31 std::cout << options.help({
"",
"Group"}) << std::endl;
35 if (result.arguments().size() == 0) {
36 std::cout <<
"DO error handling" << std::endl;
39 }
catch (
const cxxopts::OptionException &e) {
40 std::cout <<
"error parsing options: " << e.what() << std::endl;
18cxxopts::ParseResult
parse(
int argc,
char *argv[]) {
…}
cxxopts::ParseResult parse(int argc, char *argv[])