20 #ifndef PALUDIS_GUARD_ARGS_ARGS_HANDLER_HH 21 #define PALUDIS_GUARD_ARGS_ARGS_HANDLER_HH 1 23 #include <paludis/args/args_section.hh> 25 #include <paludis/util/iterator_range.hh> 49 #include <paludis/args/args_handler-se.hh> 71 void add_usage_line(
const std::string & l);
76 void add_environment_variable(
const std::string & e,
const std::string & desc);
81 void add_example(
const std::string & e,
const std::string & desc);
86 void add_note(
const std::string &);
91 void add_description_line(
const std::string & l);
98 void add_see_also(
const std::string &,
int section);
108 void dump_to_stream(std::ostream & s)
const;
113 virtual void post_run();
132 struct ParametersConstIteratorTag;
135 ParametersConstIterator begin_parameters()
const;
136 ParametersConstIterator end_parameters()
const;
139 return make_range(begin_parameters(), end_parameters());
150 const std::shared_ptr<const Sequence<std::string> > separate_after_dashes_args()
const 158 void add_option(
ArgsOption *
const,
const std::string & long_name,
159 const char short_name =
'\0');
164 void remove_option(
const std::string & long_name,
const char short_name =
'\0');
172 virtual std::string app_name()
const = 0;
185 virtual std::string app_synopsis()
const = 0;
190 virtual std::string app_description()
const = 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;
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;
232 ExamplesConstIterator begin_examples()
const;
233 ExamplesConstIterator end_examples()
const;
236 return make_range(begin_examples(), end_examples());
244 struct ArgsSectionsConstIteratorTag;
247 ArgsSectionsConstIterator begin_args_sections()
const;
248 ArgsSectionsConstIterator end_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;
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());
358 const std::pair<std::string, std::string> >;
360 const std::pair<std::string, std::string> >;
Definition: about_metadata-fwd.hh:23
Definition: iterator_range.hh:28
std::ostream & operator<<(std::ostream &, const ArgsHandlerOption &) PALUDIS_VISIBLE
Definition: example_command_line.hh:15
Definition: sequence-fwd.hh:32
Definition: args_section.hh:41
Definition: wrapped_forward_iterator-fwd.hh:26
Definition: args_handler.hh:59
Definition: args_option.hh:74
Definition: options-fwd.hh:34
virtual std::string man_section() const
Definition: args_handler.hh:177
#define PALUDIS_ATTRIBUTE(x)
Definition: attributes.hh:53
#define PALUDIS_VISIBLE
Definition: attributes.hh:59