21 #ifndef mia_core_cmdoption_hh
22 #define mia_core_cmdoption_hh
61 CCmdOption(
char short_opt,
const char *long_opt,
const char *long_help,
77 size_t get_needed_args()
const;
82 void write_value(std::ostream& os)
const;
87 void set_value(
const char *str_value);
90 const char *get_long_option()
const;
93 char get_short_option()
const;
98 void print_short_help(std::ostream& os)
const;
103 void get_opt_help(std::ostream& os)
const;
108 void get_long_help(std::ostream& os)
const;
111 const std::string get_value_as_string()
const;
114 bool is_required()
const;
117 const char *long_help()
const;
144 void clear_required();
150 virtual void do_get_long_help(std::ostream& os)
const;
154 void xmlhelp_set_attribute(
CXMLElement& node,
const char *name,
const std::string& value)
const;
156 std::string get_flag_string()
const;
157 const char *get_short_help()
const;
160 virtual void do_print_short_help(std::ostream& os)
const;
161 virtual void do_get_opt_help(std::ostream& os)
const;
163 virtual bool do_set_value(
const char *str_value) = 0;
164 virtual size_t do_get_needed_args()
const;
165 virtual void do_write_value(std::ostream& os)
const = 0;
167 virtual const std::string do_get_value_as_string()
const;
168 virtual void do_post_set();
173 const char *m_long_opt;
174 const char *m_long_help;
175 const char *m_short_help;