Public Member Functions
CParamOption Class Reference

command line option that handles a parameter More...

#include <mia/core/paramoption.hh>

Inheritance diagram for CParamOption:
CCmdOption

Public Member Functions

 CParamOption (char short_option, const char *long_opt, CParameter *param)
 
- Public Member Functions inherited from CCmdOption
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 Public Attributes inherited from CCmdOption
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...
 
- Protected Member Functions inherited from CCmdOption
void clear_required ()
 clear the "required" flag More...
 

Detailed Description

command line option that handles a parameter

This command line option handles a parameter that is set to a certain value given on the command line (contraty to just setting a flag).

Definition at line 36 of file paramoption.hh.

Constructor & Destructor Documentation

CParamOption::CParamOption ( char  short_option,
const char *  long_opt,
CParameter param 
)

Conrtructor to create the command line option.

Parameters
short_optionthe single letter option value, can be zero for none
long_optthe long option name
paramthe actual parameter, this value must be allocated by calling new, destruction is taken care of by this class.

The documentation for this class was generated from the following file: