Open Lighting Architecture  Latest Git
Public Member Functions | List of all members
ola::Flag< bool > Class Template Reference

Detailed Description

template<>
class ola::Flag< bool >

a bool flag

Inheritance diagram for ola::Flag< bool >:
Inheritance graph
[legend]
Collaboration diagram for ola::Flag< bool >:
Collaboration graph
[legend]

Public Member Functions

 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
 
Flagoperator= (bool v)
 
bool SetValue (const std::string &input)
 Set the flag value. More...
 
- Public Member Functions inherited from ola::BaseFlag
 BaseFlag (const char *arg_type, const char *short_opt, const char *help)
 Create a new BaseFlag. More...
 
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. More...
 
void MarkAsPresent ()
 Set that the flag was present on the command line.
 

Additional Inherited Members

- Protected Member Functions inherited from ola::BaseFlag
void ReplaceUnderscoreWithHyphen (char *input)
 
const char * NewCanonicalName (const char *name)
 

Member Function Documentation

◆ SetValue()

bool ola::Flag< bool >::SetValue ( const std::string &  input)
inlinevirtual

Set the flag value.

Parameters
inputthe 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 files: