1 #ifndef OOKII_COMMAND_LINE_GENERATED_H_
4 #define OOKII_COMMAND_LINE_GENERATED_H_
17 #define OOKII_DECLARE_CREATE_BUILDER_METHOD_EX(char_type) \
18 ::ookii::basic_parser_builder<char_type> create_builder(::std::basic_string<char_type> command_name, \
19 ::ookii::basic_localized_string_provider<char_type> *string_provider = nullptr, const std::locale &locale = {})
30 #define OOKII_GENERATED_METHODS_EX(type, char_type) \
31 static ::std::optional<type> parse(int argc, const char_type* const argv[], ::ookii::basic_usage_writer<char_type> *usage = nullptr, \
32 ::ookii::basic_localized_string_provider<char_type> *string_provider = nullptr, const std::locale &locale = {}) \
34 auto name = ::ookii::basic_command_line_parser<char_type>::get_executable_name(argc, argv); \
36 auto parser = args.create_builder(name, string_provider, locale).build(); \
37 if (parser.parse(argc, argv, usage)) \
43 OOKII_DECLARE_CREATE_BUILDER_METHOD_EX(char_type)
52 #define OOKII_DECLARE_CREATE_BUILDER_METHOD() OOKII_DECLARE_CREATE_BUILDER_METHOD_EX(ookii::details::default_char_type)
64 #define OOKII_GENERATED_METHODS(type) OOKII_GENERATED_METHODS_EX(type, ookii::details::default_char_type)
82 std::basic_string<details::default_char_type> application_name,
84 const std::locale& locale = {});
Manages registration, creation and invocation of subcommands for an application.
Definition: subcommand.h:313
Provides custom localized strings.
Definition: localized_string_provider.h:30
This header includes all the main Ookii.CommandLine.Cpp functionality.
Namespace containing the core Ookii.CommandLine.Cpp types.
Definition: command_line_argument.h:16
basic_command_manager< details::default_char_type > register_commands(std::basic_string< details::default_char_type > application_name, basic_localized_string_provider< details::default_char_type > *string_provider=nullptr, const std::locale &locale={})
Function that registers all the subcommands generated by New-Subcommand.ps1.