Function clingo_sys::clingo_control_new
[−]
[src]
pub unsafe extern "C" fn clingo_control_new(
arguments: *const *const c_char,
arguments_size: usize,
logger: clingo_logger_t,
logger_data: *mut c_void,
message_limit: c_uint,
control: *mut *mut clingo_control_t
) -> bool
Create a new control object.
A control object has to be freed using clingo_control_free().
Note: Only gringo options (without --output
) and clasp`s options are supported as arguments,
except basic options such as --help
.
Furthermore, a control object is blocked while a search call is active;
you must not call any member function during search.
If the logger is NULL, messages are printed to stderr.
Parameters:
arguments
- C string array of command line argumentsarguments_size
- size of the arguments arraylogger
- callback functions for warnings and info messageslogger_data
- user data for the logger callbackmessage_limit
- maximum number of times the logger callback is calledcontrol
- resulting control object
Returns whether the call was successful; might set one of the following error codes:
- ::clingo_error_bad_alloc
- ::clingo_error_runtime if argument parsing fails