23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
OF_ASSUME_NONNULL_BEGIN
/*!
* @struct of_options_parser_option_t OFOptionsParser.h ObjFW/OFOptionsParser.h
*
* @brief An option which can be parsed by an @ref OFOptionsParser.
*/
typedef struct {
/*! The short version (e.g. `-v`) of the option or `\0` for none. */
of_unichar_t shortOption;
/*!
* The long version (e.g. `--verbose`) of the option or `nil` for none.
*/
OFString *__unsafe_unretained _Nullable longOption;
|
|
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
OF_ASSUME_NONNULL_BEGIN
/*!
* @struct of_options_parser_option_t OFOptionsParser.h ObjFW/OFOptionsParser.h
*
* @brief An option which can be parsed by an @ref OFOptionsParser.
*/
struct of_options_parser_option_t {
/*! The short version (e.g. `-v`) of the option or `\0` for none. */
of_unichar_t shortOption;
/*!
* The long version (e.g. `--verbose`) of the option or `nil` for none.
*/
OFString *__unsafe_unretained _Nullable longOption;
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*!
* An optional pointer to a bool that is set to whether the option has
* been specified.
*/
bool *_Nullable isSpecifiedPtr;
/*!
* An optional pointer to an @ref OFString * that is set to the
* argument specified for the option or `nil` for no argument.
*/
OFString *__autoreleasing _Nullable *_Nullable argumentPtr;
} of_options_parser_option_t;
/*!
* @class OFOptionsParser OFOptionsParser.h ObjFW/OFOptionsParser.h
*
* @brief A class for parsing the program options specified on the command line.
*/
OF_SUBCLASSING_RESTRICTED
|
|
>
|
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/*!
* An optional pointer to a bool that is set to whether the option has
* been specified.
*/
bool *_Nullable isSpecifiedPtr;
/*!
* An optional pointer to an `OFString *` that is set to the
* argument specified for the option or `nil` for no argument.
*/
OFString *__autoreleasing _Nullable *_Nullable argumentPtr;
};
typedef struct of_options_parser_option_t of_options_parser_option_t;
/*!
* @class OFOptionsParser OFOptionsParser.h ObjFW/OFOptionsParser.h
*
* @brief A class for parsing the program options specified on the command line.
*/
OF_SUBCLASSING_RESTRICTED
|