61 friend class ArgsSection;
62 friend std::ostream & operator<< (std::ostream &,
const ArgsHandler &);
81 void add_example(
const std::string & e,
const std::string & desc);
103 void add(ArgsSection *
const);
121 virtual ~ArgsHandler();
123 ArgsHandler(
const ArgsHandler &) =
delete;
125 ArgsHandler & operator= (
const ArgsHandler &) =
delete;
132 struct ParametersConstIteratorTag;
135 ParametersConstIterator begin_parameters()
const;
136 ParametersConstIterator end_parameters()
const;
139 return make_range(begin_parameters(), end_parameters());
159 const
char short_name =
'\0');
164 void remove_option(const std::
string & long_name, const
char short_name =
'\0');
197 struct UsageLineConstIteratorTag;
200 UsageLineConstIterator begin_usage_lines()
const;
201 UsageLineConstIterator end_usage_lines()
const;
204 return make_range(begin_usage_lines(), end_usage_lines());
212 struct EnvironmentLineConstIteratorTag;
214 const std::pair<std::string, std::string> > EnvironmentLineConstIterator;
216 EnvironmentLineConstIterator begin_environment_lines()
const;
217 EnvironmentLineConstIterator end_environment_lines()
const;
220 return make_range(begin_environment_lines(), end_environment_lines());
228 struct ExamplesConstIteratorTag;
230 const std::pair<std::string, std::string> > ExamplesConstIterator;
232 ExamplesConstIterator begin_examples()
const;
233 ExamplesConstIterator end_examples()
const;
236 return make_range(begin_examples(), end_examples());
244 struct ArgsSectionsConstIteratorTag;
245 typedef WrappedForwardIterator<ArgsSectionsConstIteratorTag, const ArgsSection> ArgsSectionsConstIterator;
247 ArgsSectionsConstIterator begin_args_sections()
const;
248 ArgsSectionsConstIterator end_args_sections()
const;
250 IteratorRange<ArgsSectionsConstIterator> args_sections()
const {
251 return make_range(begin_args_sections(), end_args_sections());
266 struct NotesIteratorTag;
269 NotesIterator begin_notes() const;
270 NotesIterator end_notes() const;
273 return make_range(begin_notes(), end_notes());
281 struct DescriptionLineConstIteratorTag;
284 DescriptionLineConstIterator begin_description_lines()
const;
285 DescriptionLineConstIterator end_description_lines()
const;
288 return make_range(begin_description_lines(), end_description_lines());
297 struct SeeAlsoConstIteratorTag;
300 SeeAlsoConstIterator begin_see_alsos()
const;
301 SeeAlsoConstIterator end_see_alsos()
const;
304 return make_range(begin_see_alsos(), end_see_alsos());
312 struct ArgsIteratorTag;
313 typedef WrappedForwardIterator<ArgsIteratorTag, std::string> ArgsIterator;
326 const char *
const *
const argv,
327 const std::string & client,
328 const std::string & env_var,
329 const std::string & env_prefix,
330 const ArgsHandlerOptions & options = ArgsHandlerOptions());
341 const std::string & client,
342 const std::string & env_var,
343 const std::string & env_prefix,
344 const ArgsHandlerOptions & options = ArgsHandlerOptions());
void run(const int argc, const char *const *const argv, const std::string &client, const std::string &env_var, const std::string &env_prefix, const ArgsHandlerOptions &options=ArgsHandlerOptions())