Ookii.CommandLine for C++  1.0.0
Macros
command_line_generated.h File Reference

Provides helpers for using the New-Parser.ps1 and New-ShellCommand.ps1 scripts. More...

Go to the source code of this file.

Macros

#define OOKII_DECLARE_PARSE_METHOD(type)   OOKII_DECLARE_PARSE_METHOD_EX(type, ookii::details::default_char_type)
 A script to declare the static parse member function that the New-Parser.ps1 script will generate, using the default character type. More...
 
#define OOKII_DECLARE_PARSE_METHOD_EX(type, char_type)    static ::std::optional<type> parse(int argc, const char_type* const argv[], const ::ookii::basic_usage_options<char_type> &options = {})
 A script to declare the static parse member function that the New-Parser.ps1 script will generate, using the specified character type. More...
 

Detailed Description

Provides helpers for using the New-Parser.ps1 and New-ShellCommand.ps1 scripts.

Macro Definition Documentation

◆ OOKII_DECLARE_PARSE_METHOD

#define OOKII_DECLARE_PARSE_METHOD (   type)    OOKII_DECLARE_PARSE_METHOD_EX(type, ookii::details::default_char_type)

A script to declare the static parse member function that the New-Parser.ps1 script will generate, using the default 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.

Parameters
typeThe type of the struct or class that contains the arguments.

◆ OOKII_DECLARE_PARSE_METHOD_EX

#define OOKII_DECLARE_PARSE_METHOD_EX (   type,
  char_type 
)     static ::std::optional<type> parse(int argc, const char_type* const argv[], const ::ookii::basic_usage_options<char_type> &options = {})

A script to declare the static parse member function 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.

Parameters
typeThe type of the struct or class that contains the arguments.
char_typeThe character type to use for strings.