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.

Param 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.

Param 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. If this value contains a string, it must be copied if it needs to persist beyond this call. The string that holds the value will be destroyed upon return from this callback.

Param 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.

Return

A ParseResult result code indicating whether the parsing was successful.