[][src]Function clingo_sys::clingo_options_add

pub unsafe extern "C" fn clingo_options_add(
    options: *mut clingo_options_t,
    group: *const c_char,
    option: *const c_char,
    description: *const c_char,
    parse: Option<unsafe extern "C" fn(value: *const c_char, data: *mut c_void) -> bool>,
    data: *mut c_void,
    multi: bool,
    argument: *const c_char
) -> bool

Add an option that is processed with a custom parser.

Note that the parser also has to take care of storing the semantic value of the option somewhere.

Parameter option specifies the name(s) of the option. For example, "ping,p" adds the short option "-p" and its long form "--ping". It is also possible to associate an option with a help level by adding "@l" to the option specification. Options with a level greater than zero are only shown if the argument to help is greater or equal to l.

@param[in] options object to register the option with @param[in] group options are grouped into sections as given by this string @param[in] option specifies the command line option @param[in] description the description of the option @param[in] parse callback to parse the value of the option @param[in] data user data for the callback @param[in] multi whether the option can appear multiple times on the command-line @param[in] argument optional string to change the value name in the generated help output @return whether the call was successful