21.02
|
Class to parse command line arguments. More...
#include <CommandLineParser.h>
Public Member Functions | |
CommandLineParser ()=default | |
Default constructor. More... | |
template<typename T , typename... As> | |
T * | add_option (const std::string &name, As &&... args) |
Function to add a new option to the parser. More... | |
template<typename T , typename... As> | |
T * | add_positional_option (As &&... args) |
Function to add a new positional argument to the parser. More... | |
void | parse (int argc, char **argv) |
Parses the command line arguments and updates the options accordingly. More... | |
bool | validate () const |
Validates the previously parsed command line arguments. More... | |
void | print_help (const std::string &program_name) const |
Prints a help message for all configured options. More... | |
Class to parse command line arguments.
Definition at line 44 of file CommandLineParser.h.
|
default |
Default constructor.
|
inline |
Function to add a new option to the parser.
[in] | name | Name of the option. Will be available under –name=VALUE. |
[in] | args | Option specific configuration arguments. |
Definition at line 103 of file CommandLineParser.h.
References GemmTuner::args.
Referenced by CommonGemmExampleOptions::CommonGemmExampleOptions(), CommonGraphOptions::CommonGraphOptions(), CommonOptions::CommonOptions(), main(), and arm_compute::utils::run_example().
|
inline |
Function to add a new positional argument to the parser.
[in] | args | Option specific configuration arguments. |
Definition at line 110 of file CommandLineParser.h.
References GemmTuner::args.
Referenced by main().
|
inline |
Parses the command line arguments and updates the options accordingly.
[in] | argc | Number of arguments. |
[in] | argv | Arguments. |
Definition at line 116 of file CommandLineParser.h.
References name.
Referenced by GraphValidateExample< DepthwiseConvolutionLayer, DepthConvolutionOptions, DepthConvolutionVerifyAccessor >::do_setup(), main(), and arm_compute::utils::run_example().
|
inline |
Prints a help message for all configured options.
[in] | program_name | Name of the program to be used in the help message. |
Definition at line 217 of file CommandLineParser.h.
Referenced by GraphValidateExample< DepthwiseConvolutionLayer, DepthConvolutionOptions, DepthConvolutionVerifyAccessor >::do_setup(), main(), and arm_compute::utils::run_example().
|
inline |
Validates the previously parsed command line arguments.
Validation fails if not all required options are provided. Additionally warnings are generated for options that have illegal values or unknown options.
Definition at line 182 of file CommandLineParser.h.
Referenced by main().