21 #ifndef mia_core_cmdoption_hh
22 #define mia_core_cmdoption_hh
29 #include <libxml++/libxml++.h>
66 CCmdOption(
char short_opt,
const char *long_opt,
const char *long_help,
67 const char *short_help,
bool required);
81 size_t get_needed_args()
const;
86 void write_value(std::ostream& os)
const;
91 void set_value(
const char *str_value);
94 const char *get_long_option()
const;
97 char get_short_option()
const;
102 void print_short_help(std::ostream& os)
const;
107 void get_opt_help(std::ostream& os)
const;
112 void get_long_help(std::ostream& os)
const;
115 const std::string get_value_as_string()
const;
118 bool is_required()
const;
121 const char *long_help()
const;
131 std::string get_long_help_xml(xmlpp::Element& parent,
HandlerHelpMap& handler_map)
const;
140 void clear_required();
146 virtual void do_get_long_help(std::ostream& os)
const;
148 const char *get_short_help()
const;
151 virtual void do_print_short_help(std::ostream& os)
const;
152 virtual void do_get_opt_help(std::ostream& os)
const;
154 virtual bool do_set_value(
const char *str_value) = 0;
155 virtual size_t do_get_needed_args()
const;
156 virtual void do_write_value(std::ostream& os)
const = 0;
158 virtual const std::string do_get_value_as_string()
const;
159 virtual void do_post_set();
161 virtual void do_get_long_help_xml(std::ostream& os, xmlpp::Element& parent,
HandlerHelpMap& handler_map)
const;
164 const char *m_long_opt;
165 const char *m_long_help;
166 const char *m_short_help;