|
MarlinMT
0.1.0
|
CmdLineParser class Does the main command line parsing for MarlinMT. More...
#include <CmdLineParser.h>
Classes | |
| struct | ParseResult |
| ParseResult struct. The result of the command line parsing. More... | |
Public Types | |
| using | AdditionalArgs = std::map< std::string, std::string > |
Public Member Functions | |
| CmdLineParser ()=default | |
| Default constructor. More... | |
| ~CmdLineParser ()=default | |
| Default destructor. More... | |
| void | setOptionalArgs (bool opt=true) |
| Set all cmd line arguments to optional during parsing. More... | |
| std::vector< std::string > | getStandardOptions () const |
| Get all possible command options (short and long options) More... | |
| ParseResult | parse (int argc, char **argv) |
| Parse the command line. More... | |
Private Attributes | |
| bool | _optionalArgs {false} |
| Whether all arguments are optional. More... | |
CmdLineParser class Does the main command line parsing for MarlinMT.
Definition at line 14 of file CmdLineParser.h.
| using marlinmt::CmdLineParser::AdditionalArgs = std::map<std::string, std::string> |
Definition at line 16 of file CmdLineParser.h.
|
default |
Default constructor.
|
default |
Default destructor.
| std::vector< std::string > marlinmt::CmdLineParser::getStandardOptions | ( | ) | const |
Get all possible command options (short and long options)
Definition at line 81 of file CmdLineParser.cc.
| CmdLineParser::ParseResult marlinmt::CmdLineParser::parse | ( | int | argc, |
| char ** | argv | ||
| ) |
Parse the command line.
| argc | the number of arguments |
| argv | the full argument list |
Definition at line 90 of file CmdLineParser.cc.
References marlinmt::CmdLineParser::ParseResult::_arguments, MARLINMT_RELEASE, MARLINMT_THROW, and marlinmt::details::nthreads().
Referenced by marlinmt::Application::init().
| void marlinmt::CmdLineParser::setOptionalArgs | ( | bool | opt = true | ) |
Set all cmd line arguments to optional during parsing.
| opt | input flag |
Definition at line 75 of file CmdLineParser.cc.
|
private |
Whether all arguments are optional.
Definition at line 62 of file CmdLineParser.h.