carb::options::ArgParserFunc

Defined in carb/extras/Options.h

using carb::options::ArgParserFunc = ParseResult (*)(const char *name, const Value *value, Options *args)

Prototype of a parser function to handle a single option.

Parameters
  • name[in] The name of the option being parsed. If the name and value was in a pair separated by an equal sign (‘=’), both the name and value will be present in the string. This will not be nullptr.

  • value[in] The value of the option if one is expected, or nullptr if no option is expected. This will be the value to be passed in with the option.

  • args[out] Receives the results of parsing the option. It is the handler’s responsibility to ensure this object is filled in or initialized properly.

Returns

A ParseResult result code indicating whether the parsing was successful.