ONE - On-device Neural Engine
|
#include <arser.h>
Public Member Functions | |
Argument (const std::string &arg_name) | |
Argument (const std::string &short_name, const std::string &long_name) | |
Argument (const std::string &short_name, const std::string &long_name, const std::vector< std::string > &names) | |
Argument & | nargs (uint32_t num) |
Argument & | type (DataType type) |
Argument & | required (void) |
Argument & | required (bool value) |
Argument & | accumulated (void) |
Argument & | accumulated (bool value) |
Argument & | help (std::string help_message) |
Argument & | help (std::initializer_list< std::string > help_messages) |
Argument & | exit_with (const std::function< void(void)> &func) |
template<typename T > | |
Argument & | default_value (const T value) |
template<typename T , typename... Ts> | |
Argument & | default_value (const T value, const Ts... values) |
Friends | |
class | Arser |
std::ostream & | operator<< (std::ostream &, const Arser &) |
Argument ├── positional argument └── optioanl argument [ dash at the beginning of the string ] ├── long option [ two or more dashes ] └── short option [ one dash ]
Argument has two types - positional argument, optional argument.
The way to distinguish the two types is whether there is a dash('-') at the beginning of the string.
And, optional argument has two types as well - long option, short option, which is distinguished by the number of dash.
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
Definition at line 176 of file arser.h.
|
inline |
|
inline |
|
inline |
Definition at line 275 of file arser.h.
References arser::internal::to_string().
Referenced by default_value().
|
inline |
Definition at line 291 of file arser.h.
References default_value(), and arser::internal::to_string().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 199 of file arser.h.
References type().
Referenced by type().
|
friend |