|
|
| Flag (const char *name, const char *arg_type, const char *short_opt, bool default_value, const char *help, const bool has_arg) |
| |
| const char * | name () const |
| | Get the flag name.
|
| |
| bool | has_arg () const |
| | Whether the flag requires an argument.
|
| |
|
bool | default_value () const |
| |
|
| operator bool () const |
| |
|
Flag & | operator= (bool v) |
| |
| bool | SetValue (const std::string &input) |
| | Set the flag value.
|
| |
| | Flag (const char *name, const char *arg_type, const char *short_opt, bool default_value, const char *help, const bool has_arg) |
| | Create a new Flag.
|
| |
| const char * | name () const |
| | Get the flag name.
|
| |
| bool | has_arg () const |
| | Whether the flag requires an argument.
|
| |
|
bool | default_value () const |
| |
|
| operator bool () const |
| |
|
Flag & | operator= (bool v) |
| |
| bool | SetValue (const std::string &input) |
| | Used to set the value of a flag.
|
| |
| | BaseFlag (const char *arg_type, const char *short_opt, const char *help) |
| | Create a new BaseFlag.
|
| |
| char | short_opt () const |
| | Get the flag short option.
|
| |
| const char * | arg_type () const |
| | Get the flag argument type.
|
| |
| std::string | help () const |
| | Get the flag help string.
|
| |
| bool | present () const |
| | Check if the flag was present on the command line. Good for switching behaviour when a flag is used.
|
| |
|
void | MarkAsPresent () |
| | Set that the flag was present on the command line.
|
| |
|
|
void | ReplaceUnderscoreWithHyphen (char *input) |
| |
|
const char * | NewCanonicalName (const char *name) |
| |
◆ Flag()
| ola::Flag< bool >::Flag |
( |
const char * | name, |
|
|
const char * | arg_type, |
|
|
const char * | short_opt, |
|
|
bool | default_value, |
|
|
const char * | help, |
|
|
const bool | has_arg ) |
|
inline |
Create a new Flag.
- Parameters
-
| name | the name of the flag |
| arg_type | the type of flag argument |
| short_opt | the short option for the flag |
| default_value | the flag's default value |
| help | the help string for the flag |
| has_arg | if the flag should use an argument, only overrides Flag<bool> |
◆ has_arg() [1/2]
◆ has_arg() [2/2]
◆ name() [1/2]
| const char * ola::Flag< bool >::name |
( |
| ) |
const |
|
inlinevirtual |
◆ name() [2/2]
| const char * ola::Flag< bool >::name |
( |
| ) |
const |
|
inlinevirtual |
◆ SetValue() [1/2]
| bool ola::Flag< bool >::SetValue |
( |
const std::string & | input | ) |
|
|
virtual |
◆ SetValue() [2/2]
| bool ola::Flag< bool >::SetValue |
( |
const std::string & | input | ) |
|
|
inlinevirtual |
Set the flag value.
- Parameters
-
| input | the input passed on the command line |
- Returns
- true on success, false otherwise
Implements ola::FlagInterface.
The documentation for this class was generated from the following file: