Public Member Functions
CCmdStringOption Class Reference

The command line option that expects a string. More...

#include <mia/core/cmdstringoption.hh>

Inheritance diagram for CCmdStringOption:
CCmdOption

Public Member Functions

 CCmdStringOption (std::string &value, char short_opt, const char *long_opt, const char *long_help, bool required, const CPluginHandlerBase *plugin_hint)
- 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

Additional Inherited Members

- Static Public Attributes inherited from CCmdOption
static const bool not_required
 readability constant to show that an option is not required
static const bool required
 readability constant to show that an option is required
- Protected Member Functions inherited from CCmdOption
void clear_required ()
 clear the "required" flag
virtual void do_get_long_help (std::ostream &os) const

Detailed Description

The command line option that expects a string.

This command line option expects a string a parameter. It supports giving a hint to the help system that the actual string will be used for to construct a plug-in based object.

Definition at line 39 of file cmdstringoption.hh.

Constructor & Destructor Documentation

CCmdStringOption::CCmdStringOption ( std::string &  value,
char  short_opt,
const char *  long_opt,
const char *  long_help,
bool  required,
const CPluginHandlerBase plugin_hint 
)

Construct a string option

Parameters
[in,out]valueat input the default value, at output the value read from the command line
short_optthe one letter command line option
long_optthe long command line option
long_helpthe full help string that describes the option completely
requiredset to true if the parameter must be given by the user
plugin_hintif the string will later be used to create an object by using plug-in then pass a pointer to the corresponding plug-in handler to give a hint the help system about this connection.

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