![]() |
Open Lighting Architecture 0.10.9
|
The interface for the Flag classes.
Public Member Functions | |
| virtual const char * | name () const =0 |
| Get the flag name. | |
| virtual char | short_opt () const =0 |
| Get the flag short option. | |
| virtual bool | has_arg () const =0 |
| Whether the flag requires an argument. | |
| virtual const char * | arg_type () const =0 |
| Get the flag argument type. | |
| virtual std::string | help () const =0 |
| Get the flag help string. | |
| virtual bool | present () const =0 |
| Check if the flag was present on the command line. Good for switching behaviour when a flag is used. | |
| virtual bool | SetValue (const std::string &input)=0 |
| Set the flag value. | |
|
pure virtual |
Get the flag argument type.
Implemented in ola::BaseFlag, and ola::Flag< std::string >.
|
pure virtual |
Whether the flag requires an argument.
Implemented in ola::Flag< T >, ola::Flag< bool >, ola::Flag< bool >, ola::Flag< std::string >, and ola::Flag< std::string >.
|
pure virtual |
Get the flag help string.
Implemented in ola::BaseFlag.
|
pure virtual |
Get the flag name.
Implemented in ola::Flag< T >, ola::Flag< bool >, ola::Flag< bool >, ola::Flag< std::string >, and ola::Flag< std::string >.
|
pure virtual |
Check if the flag was present on the command line. Good for switching behaviour when a flag is used.
Implemented in ola::BaseFlag.
|
pure virtual |
Set the flag value.
| input | the input passed on the command line |
Implemented in ola::Flag< T >, ola::Flag< bool >, ola::Flag< bool >, ola::Flag< std::string >, and ola::Flag< std::string >.
|
pure virtual |
Get the flag short option.
Implemented in ola::BaseFlag.