ObjFW
Public Attributes | List of all members
of_options_parser_option_t Struct Reference

An option which can be parsed by an OFOptionsParser. More...

#include <ObjFW/OFOptionsParser.h>

Public Attributes

of_unichar_t shortOption
 
OFString *__unsafe_unretained _Nullable longOption
 
signed char hasArgument
 
bool *_Nullable isSpecifiedPtr
 
OFString *__autoreleasing _Nullable *_Nullable argumentPtr
 

Detailed Description

An option which can be parsed by an OFOptionsParser.

Member Data Documentation

◆ argumentPtr

OFString* __autoreleasing _Nullable* _Nullable of_options_parser_option_t::argumentPtr

An optional pointer to an OFString * that is set to the argument specified for the option or nil for no argument.

◆ hasArgument

signed char of_options_parser_option_t::hasArgument

Whether the option takes an argument.

0 means it takes no argument.
1 means it takes a required argument.
-1 means it takes an optional argument.
All other values are invalid and will throw an OFInvalidArgumentException.

◆ isSpecifiedPtr

bool* _Nullable of_options_parser_option_t::isSpecifiedPtr

An optional pointer to a bool that is set to whether the option has been specified.

◆ longOption

OFString* __unsafe_unretained _Nullable of_options_parser_option_t::longOption

The long version (e.g. --verbose) of the option or nil for none.

◆ shortOption

of_unichar_t of_options_parser_option_t::shortOption

The short version (e.g. -v) of the option or \0 for none.


The documentation for this struct was generated from the following file: