@@ -20,25 +20,25 @@ @class OFMapTable; 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. */ + /** 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; - /*! + /** * Whether the option takes an argument. * * 0 means it takes no argument.@n * 1 means it takes a required argument.@n * -1 means it takes an optional argument.@n @@ -46,25 +46,25 @@ * All other values are invalid and will throw an * @ref OFInvalidArgumentException. */ signed char hasArgument; - /*! + /** * 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 @@ -77,21 +77,21 @@ of_unichar_t _lastOption; OFString *_Nullable _lastLongOption, *_Nullable _argument; bool _done; } -/*! +/** * @brief The last parsed option. * * If @ref nextOption returned `?` or `:`, this returns the option which was * unknown or for which the argument was missing.@n * If this returns `-`, the last option is only available as a long option (see * lastLongOption). */ @property (readonly, nonatomic) of_unichar_t lastOption; -/*! +/** * @brief The long option for the last parsed option, or `nil` if the last * parsed option was not passed as a long option by the user. * * In case @ref nextOption returned `?`, this contains the unknown long * option.@n @@ -104,23 +104,23 @@ * user specified a long option, this only returns the long option if * it was actually specified as a long option by the user. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *lastLongOption; -/*! +/** * @brief The argument for the last parsed option, or `nil` if the last parsed * option takes no argument. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *argument; -/*! +/** * @brief The arguments following the last option. */ @property (readonly, nonatomic) OFArray OF_GENERIC(OFString *) *remainingArguments; -/*! +/** * @brief Creates a new OFOptionsParser which accepts the specified options. * * @param options An array of @ref of_options_parser_option_t specifying all * accepted options, terminated with an option whose short * option is `\0` and long option is `nil`. @@ -129,11 +129,11 @@ */ + (instancetype)parserWithOptions: (const of_options_parser_option_t *)options; - (instancetype)init OF_UNAVAILABLE; -/*! +/** * @brief Initializes an already allocated OFOptionsParser so that it accepts * the specified options. * * @param options An array of @ref of_options_parser_option_t specifying all * accepted options, terminated with an option whose short @@ -142,11 +142,11 @@ * @return An initialized OFOptionsParser */ - (instancetype)initWithOptions: (const of_options_parser_option_t *)options OF_DESIGNATED_INITIALIZER; -/*! +/** * @brief Returns the next option. * * If the option is only available as a long option, `-` is returned. * Otherwise, the short option is returned, even if it was specified as a long * option.@n