A radial quantity.
More...
#include <vmec_test_commandline_parser.hpp>
|
| commandline_parser (const size_t argc, const char *argv[], const std::function< void(void)> help) |
| Construct a commandline_parser object by pasring command line arguments. More...
|
|
bool | is_set (const std::string &key) const |
| Check if command arg was set. More...
|
|
template<typename TYPE > |
TYPE | get (const std::string &key) const |
| Get the value of the agument. More...
|
|
|
static arg_map | parse_commands (const size_t argc, const char *argv[], const std::function< void(void)> help) |
| Factory method to parse the commandline and produce the arguments. More...
|
|
|
const arg_map | commands |
| Parsed commands.
|
|
const std::function< void(void)> | help |
| Help callback function.
|
|
◆ commandline_parser()
vmec_test::commandline_parser::commandline_parser |
( |
const size_t |
argc, |
|
|
const char * |
argv[], |
|
|
const std::function< void(void)> |
help |
|
) |
| |
|
inline |
Construct a commandline_parser object by pasring command line arguments.
- Parameters
-
[in] | argc | Number of commandline arguments. |
[in] | argv | Commandline strings. |
[in] | help | Call back function to display the help message. |
◆ get()
template<typename TYPE >
TYPE vmec_test::commandline_parser::get |
( |
const std::string & |
key | ) |
const |
|
inline |
Get the value of the agument.
- Parameters
-
[in] | key | Commandline key to check. |
- Returns
- Value of the argument.
◆ is_set()
bool vmec_test::commandline_parser::is_set |
( |
const std::string & |
key | ) |
const |
|
inline |
Check if command arg was set.
- Parameters
-
[in] | key | Commandline key to check. |
- Returns
- True if the key was set.
◆ parse_commands()
static arg_map vmec_test::commandline_parser::parse_commands |
( |
const size_t |
argc, |
|
|
const char * |
argv[], |
|
|
const std::function< void(void)> |
help |
|
) |
| |
|
inlinestatic |
Factory method to parse the commandline and produce the arguments.
- Parameters
-
[in] | argc | Number of commandline arguments. |
[in] | argv | Commandline strings. |
[in] | help | Call back function to display the help message. |
- Returns
- A constructed map of commandline argument key value pairs.
The documentation for this class was generated from the following file: