mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user