Open Lighting Architecture
0.9.2
|
The common implementation.
Public Member Functions | |
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. | |
Public Member Functions inherited from ola::FlagInterface | |
virtual const char * | name () const =0 |
Get the flag name. | |
virtual bool | has_arg () const =0 |
Whether the flag requires an argument. | |
virtual bool | SetValue (const std::string &input)=0 |
Set the flag value. |
Protected Member Functions | |
void | ReplaceUnderscoreWithHyphen (char *input) |
const char * | NewCanonicalName (const char *name) |
|
inline |
Create a new BaseFlag.
arg_type | the type of flag argument |
short_opt | the short option for the flag |
help | the help string for the flag |
|
inlinevirtual |
Check if the flag was present on the command line. Good for switching behaviour when a flag is used.
Implements ola::FlagInterface.