23.08
|
Implementation of a simple option that accepts a value from a fixed set. More...
#include <EnumOption.h>
Public Member Functions | |
EnumOption (std::string name, std::set< T > allowed_values) | |
Construct option with allowed values. More... | |
EnumOption (std::string name, std::set< T > allowed_values, T default_value) | |
Construct option with allowed values, a fixed number of accepted values and default values for the option. More... | |
bool | parse (std::string value) override |
Parses the given string. More... | |
std::string | help () const override |
Help message for the option. More... | |
const T & | value () const |
Get the selected value. More... | |
![]() | |
SimpleOption (std::string name, T default_value) | |
Construct the option with the given default value. More... | |
bool | parse (std::string value) override |
Parses the given string. More... | |
std::string | help () const override |
Help message for the option. More... | |
const T & | value () const |
Get the option value. More... | |
bool | parse (std::string value) |
Parses the given string. More... | |
Option (std::string name) | |
Constructor. More... | |
Option (std::string name, bool is_required, bool is_set) | |
Constructor. More... | |
![]() | |
Option (std::string name) | |
Constructor. More... | |
Option (std::string name, bool is_required, bool is_set) | |
Constructor. More... | |
virtual | ~Option ()=default |
Default destructor. 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... | |
Implementation of a simple option that accepts a value from a fixed set.
Definition at line 40 of file EnumOption.h.
|
inline |
Construct option with allowed values.
[in] | name | Name of the option. |
[in] | allowed_values | Set of allowed values for the option. |
Definition at line 72 of file EnumOption.h.
|
inline |
Construct option with allowed values, a fixed number of accepted values and default values for the option.
[in] | name | Name of the option. |
[in] | allowed_values | Set of allowed values for the option. |
[in] | default_value | Default value. |
Definition at line 78 of file EnumOption.h.
|
overridevirtual |
Help message for the option.
Implements Option.
Definition at line 114 of file EnumOption.h.
|
overridevirtual |
Parses the given string.
[in] | value | String representation as passed on the command line. |
Implements Option.
Definition at line 84 of file EnumOption.h.
|
inline |
Get the selected value.
Definition at line 130 of file EnumOption.h.
Referenced by gemm_tuner::consume_common_gemm_example_parameters(), arm_compute::utils::consume_common_graph_parameters(), CommonGraphValidateOptions::consume_common_parameters(), CommonOptions::create_printers(), and main().