CommandLineInterface
-
class CommandLineInterface
Class to provde basic interaction via command line parameters.
NOTE: uses cxxopts internally, but cxxopt objects are passed via API
Public Functions
-
CommandLineInterface(App &app, int argc, const char *const *argv)
Build an application object.
- Parameters:
argc – Number of command line arguments
argv – Command line arguments
-
CommandLineInterface(App &app, const std::vector<String> &args)
Build an application.
- Parameters:
comm – MPI communicator
name – Name of the application
args – Command line arguments (without the executable name as first argument)
-
cxxopts::ParseResult parse(cxxopts::Options &opts)
Parse command line arguments.
- Returns:
Result of parsing the command line
-
int run(const cxxopts::Options &opts, const cxxopts::ParseResult &result)
Entry point into command line parameter processing.
- Returns:
Process exit code. This can be reported back into calling process if needed.
Public Static Functions
-
static cxxopts::Options default_command_line_options()
Create default command line options.
-
CommandLineInterface(App &app, int argc, const char *const *argv)