A command line option that will appear in the help group and exits the program after printing the help. More...
#include <mia/core/cmdlineparser.hh>
Data Structures | |
class | Callback |
Interface for the callback to print the help assositated with the given option. More... | |
Public Member Functions | |
CHelpOption (Callback *cb, char short_opt, const char *long_opt, const char *long_help) | |
void | print (std::ostream &os) const |
![]() | |
void | add_option (CShortoptionMap &sm, CLongoptionMap &lm) |
void | add_option_xml (xmlpp::Element &parent, HandlerHelpMap &handler_map) const |
CCmdOption (char short_opt, const char *long_opt, const char *long_help, const char *short_help, bool required) __attribute__((deprecated)) | |
CCmdOption (char short_opt, const char *long_opt, const char *long_help, const char *short_help, CCmdOptionFlags flags) | |
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 | |
![]() | |
void | clear_required () |
clear the "required" flag More... | |
bool | has_flag (CCmdOptionFlags test_flags) const |
A command line option that will appear in the help group and exits the program after printing the help.
Option that will appear in the help group and setting it will always terminate the program after printing out the requested help.
Definition at line 169 of file cmdlineparser.hh.
CHelpOption::CHelpOption | ( | Callback * | cb, |
char | short_opt, | ||
const char * | long_opt, | ||
const char * | long_help | ||
) |
Constructor of the command option
cb | callback to call when help option is requested |
short_opt | short option name (or 0) |
long_opt | long option name (must not be NULL) |
long_help | long help string (must not be NULL) |
void CHelpOption::print | ( | std::ostream & | os | ) | const |
Print the option to a stream
os |