The command line option that sets a flag to true when given. More...
#include <mia/core/cmdbooloption.hh>
Public Member Functions | |
CCmdBoolOption (bool &value, char short_opt, const char *long_opt, const char *long_help) | |
![]() | |
void | add_option (CShortoptionMap &sm, CLongoptionMap &lm) |
CCmdOption (char short_opt, const char *long_opt, const char *long_help, const char *short_help, bool required) | |
void | get_long_help (std::ostream &os) const |
std::string | get_long_help_xml (xmlpp::Element &parent, HandlerHelpMap &handler_map) const |
const char * | get_long_option () const |
size_t | get_needed_args () const |
void | get_opt_help (std::ostream &os) const |
char | get_short_option () const |
const std::string | get_value_as_string () const |
bool | is_required () const |
const char * | long_help () const |
void | post_set () |
void | print_short_help (std::ostream &os) const |
void | set_value (const char *str_value) |
void | write_value (std::ostream &os) const |
virtual | ~CCmdOption () |
ensure virtual destruction More... | |
Additional Inherited Members | |
![]() | |
static const bool | not_required |
readability constant to show that an option is not required More... | |
static const bool | required |
readability constant to show that an option is required More... | |
![]() | |
void | clear_required () |
clear the "required" flag More... | |
virtual void | do_get_long_help (std::ostream &os) const |
The command line option that sets a flag to true when given.
This command line option expects no parameter. If given the associated boolen value will be set to true. Therefore, at initialization this boolean value is always forces to be set to false.
Definition at line 38 of file cmdbooloption.hh.
CCmdBoolOption::CCmdBoolOption | ( | bool & | value, |
char | short_opt, | ||
const char * | long_opt, | ||
const char * | long_help | ||
) |
Construct a bool option
[in,out] | value | at input the default value, at output the value read from the command line |
short_opt | the one letter command line option | |
long_opt | the long command line option | |
long_help | the full help bool that describes the option completely |