Ookii.CommandLine for C++
2.0.0
|
Provides helpers for using the New-Parser.ps1 and New-Subcommand.ps1 scripts. More...
#include "command_line.h"
Go to the source code of this file.
Namespaces | |
ookii | |
Namespace containing the core Ookii.CommandLine.Cpp types. | |
Macros | |
#define | OOKII_DECLARE_CREATE_BUILDER_METHOD() OOKII_DECLARE_CREATE_BUILDER_METHOD_EX(ookii::details::default_char_type) |
A macro to declare the static build() method that the New-Parser.ps1 script will generate, using the specified character type. More... | |
#define | OOKII_DECLARE_CREATE_BUILDER_METHOD_EX(char_type) |
A macro to declare the static build() method that the New-Parser.ps1 script will generate, using the specified character type. More... | |
#define | OOKII_GENERATED_METHODS(type) OOKII_GENERATED_METHODS_EX(type, ookii::details::default_char_type) |
A macro to declare the methods that a struct used with New-Parser.ps1 must have, using the default character type. More... | |
#define | OOKII_GENERATED_METHODS_EX(type, char_type) |
A macro to declare the methods that a struct used with New-Parser.ps1 must have, using the specified character type. More... | |
Functions | |
basic_command_manager< details::default_char_type > | ookii::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. More... | |
Provides helpers for using the New-Parser.ps1 and New-Subcommand.ps1 scripts.
#define OOKII_DECLARE_CREATE_BUILDER_METHOD | ( | ) | OOKII_DECLARE_CREATE_BUILDER_METHOD_EX(ookii::details::default_char_type) |
A macro to declare the static build() method that the New-Parser.ps1 script will generate, using the specified character type.
When using New-Parser.ps1, the definition of this method will be generated. This macro makes it easy to define a method that matches the exact signature expected.
The default character type is wchar_t
if _UNICODE is defined; otherwise, it's char
.
#define OOKII_DECLARE_CREATE_BUILDER_METHOD_EX | ( | char_type | ) |
A macro to declare the static build() method that the New-Parser.ps1 script will generate, using the specified character type.
When using New-Parser.ps1, the definition of this method will be generated. This macro makes it easy to define a method that matches the exact signature expected.
char_type | The character type to use for strings. |
#define OOKII_GENERATED_METHODS | ( | type | ) | OOKII_GENERATED_METHODS_EX(type, ookii::details::default_char_type) |
A macro to declare the methods that a struct used with New-Parser.ps1 must have, using the default character type.
This will add a build() method, which creates a ookii::basic_parser_builder, and a static parse() method, which will parse the arguments and handle errors. The New-Parser.ps1 script generates the definition of the build() method; the parse() method is defined by this macro.
The default character type is wchar_t
if _UNICODE is defined; otherwise, it's char
.
type | The type of the struct or class that contains the arguments. |
#define OOKII_GENERATED_METHODS_EX | ( | type, | |
char_type | |||
) |
A macro to declare the methods that a struct used with New-Parser.ps1 must have, using the specified character type.
This will add a build() method, which creates a ookii::basic_parser_builder, and a static parse() method, which will parse the arguments and handle errors. The New-Parser.ps1 script generates the definition of the build() method; the parse() method is defined by this macro.
type | The type of the struct or class that contains the arguments. |
char_type | The character type to use for strings. |