21 #ifndef mia_core_cmdoption_hh
22 #define mia_core_cmdoption_hh
62 CCmdOption(
char short_opt,
const char *long_opt,
const char *long_help,
78 size_t get_needed_args()
const;
83 void write_value(std::ostream& os)
const;
88 void set_value(
const char *str_value);
91 const char *get_long_option()
const;
94 char get_short_option()
const;
99 void print_short_help(std::ostream& os)
const;
104 void get_opt_help(std::ostream& os)
const;
109 void get_long_help(std::ostream& os)
const;
112 const std::string get_value_as_string()
const;
115 bool is_required()
const;
118 const char *long_help()
const;
145 void clear_required();
151 virtual void do_get_long_help(std::ostream& os)
const;
155 void xmlhelp_set_attribute(
CXMLElement& node,
const char *name,
const std::string& value)
const;
157 std::string get_flag_string()
const;
158 const char *get_short_help()
const;
161 virtual void do_print_short_help(std::ostream& os)
const;
162 virtual void do_get_opt_help(std::ostream& os)
const;
164 virtual bool do_set_value(
const char *str_value) = 0;
165 virtual size_t do_get_needed_args()
const;
166 virtual void do_write_value(std::ostream& os)
const = 0;
168 virtual const std::string do_get_value_as_string()
const;
169 virtual void do_post_set();
174 const char *m_long_opt;
175 const char *m_long_help;
176 const char *m_short_help;