|
WarpX
|
Typedefs | |
| using | ArgVal = std::optional<std::variant<int, double, std::string>> |
| using | Key = std::tuple<std::string, ArgType, std::string> |
| using | ParsedArgs = std::unordered_map<std::string, ArgVal> |
Enumerations | |
| enum class | ArgType { NoArg , Integer , Double , String } |
Functions | |
| template<typename T> | |
| T | GetVal (const ArgVal &arg_val) |
| Gets the value out of an ArgVal (std::optional<std::variant<int, double, std::string>>) object. | |
| ParsedArgs | ParseArgs (const std::vector< Key > &keys, const int argc, char const *const *argv) |
| Function to parse the command line arguments. | |
| void | PrintHelp (const std::vector< Key > &cmd_list) |
| Prints the command line options. | |
| using ArgParser::ArgVal = std::optional<std::variant<int, double, std::string>> |
| using ArgParser::Key = std::tuple<std::string, ArgType, std::string> |
| using ArgParser::ParsedArgs = std::unordered_map<std::string, ArgVal> |
|
strong |
| T ArgParser::GetVal | ( | const ArgVal & | arg_val | ) |
| ParsedArgs ArgParser::ParseArgs | ( | const std::vector< Key > & | keys, |
| const int | argc, | ||
| char const *const * | argv ) |
Function to parse the command line arguments.
| [in] | keys | the list of possible command line arguments |
| [in] | argc | the number of command line arguments |
| [in] | argv | all the command line arguments |
| void ArgParser::PrintHelp | ( | const std::vector< Key > & | cmd_list | ) |
Prints the command line options.
| [in] | cmd_list | the list of possible command line arguments |