ENH: add argList::optionCount method

- convenience for checking is any/all particular options have been
  specified. Eg,

  if (args.optionCount({"opt1", "opt2", "opt3"}) < 3) ...
This commit is contained in:
Mark Olesen
2017-12-19 08:20:45 +01:00
parent 4a6fc12469
commit f38ad72ad0
3 changed files with 40 additions and 0 deletions

View File

@ -58,6 +58,9 @@ int main(int argc, char *argv[])
argList args(argc, argv);
Info<<"have: "
<<args.optionCount({"label", "scalar"}) << " options" << nl;
label ival;
scalar sval;