24.02.1
|
Abstract base class for a command line option. More...
#include <Option.h>
Public Member Functions | |
Option (std::string name) | |
Constructor. More... | |
Option (std::string name, bool is_required, bool is_set) | |
Constructor. More... | |
virtual | ~Option ()=default |
Default destructor. More... | |
virtual bool | parse (std::string value)=0 |
Parses the given string. More... | |
virtual std::string | help () const =0 |
Help message for the option. More... | |
std::string | name () const |
Name of the option. More... | |
void | set_required (bool is_required) |
Set whether the option is required. More... | |
void | set_help (std::string help) |
Set the help message for the option. More... | |
bool | is_required () const |
Is the option required? More... | |
bool | is_set () const |
Has a value been assigned to the option? More... | |
|
inline |
|
inline |
Constructor.
[in] | name | Name of the option. |
[in] | is_required | Is the option required? |
[in] | is_set | Has a value been assigned to the option? |
|
virtualdefault |
Default destructor.
|
pure virtual |
Help message for the option.
Implemented in SimpleOption< T >, EnumListOption< T >, EnumOption< T >, ListOption< T >, and ToggleOption.
|
inline |
|
inline |
Has a value been assigned to the option?
Definition at line 134 of file Option.h.
Referenced by arm_compute::utils::consume_common_graph_parameters(), CommonGraphValidateOptions::consume_common_parameters(), CommonOptions::create_printers(), main(), and arm_compute::utils::run_example().
|
inline |
Name of the option.
Definition at line 114 of file Option.h.
Referenced by ToggleOption::help(), ListOption< T >::ListOption(), and ToggleOption::ToggleOption().
|
pure virtual |
Parses the given string.
[in] | value | String representation as passed on the command line. |
Implemented in EnumListOption< T >, EnumListOption< InstrumentsDescription >, EnumOption< T >, EnumOption< LogFormat >, EnumOption< arm_compute::graph::Target >, EnumOption< arm_compute::CLTunerMode >, EnumOption< LogLevel >, EnumOption< arm_compute::DataLayout >, EnumOption< arm_compute::DataType >, SimpleOption< T >, SimpleOption< LogFormat >, SimpleOption< std::string >, SimpleOption< float >, SimpleOption< int >, SimpleOption< arm_compute::graph::Target >, SimpleOption< arm_compute::CLTunerMode >, SimpleOption< unsigned int >, SimpleOption< size_t >, SimpleOption< LogLevel >, SimpleOption< arm_compute::DataLayout >, SimpleOption< arm_compute::DataType >, SimpleOption< bool >, ListOption< T >, ToggleOption, SimpleOption< T >, SimpleOption< LogFormat >, SimpleOption< std::string >, SimpleOption< float >, SimpleOption< int >, SimpleOption< arm_compute::graph::Target >, SimpleOption< arm_compute::CLTunerMode >, SimpleOption< unsigned int >, SimpleOption< size_t >, SimpleOption< LogLevel >, SimpleOption< arm_compute::DataLayout >, SimpleOption< arm_compute::DataType >, and SimpleOption< bool >.
|
inline |
Set the help message for the option.
[in] | help | Option specific help message. |
Definition at line 124 of file Option.h.
References GemmTuner::help.
Referenced by CommonGemmExampleOptions::CommonGemmExampleOptions(), CommonGraphOptions::CommonGraphOptions(), CommonGraphValidateOptions::CommonGraphValidateOptions(), CommonOptions::CommonOptions(), main(), and arm_compute::utils::run_example().
|
inline |
Set whether the option is required.
[in] | is_required | Pass true if the option is required. |