4#include <clingo/core.h>
10typedef struct clingo_control clingo_control_t;
79 bool (*
set)(
size_t const *index,
char const *value,
size_t size,
void *data);
87 bool (*
size)(
void *data,
size_t *
size,
bool *has_size);
111 size_t name_size,
char const *description,
size_t description_size,
198 size_t size,
clingo_id_t *subkey,
bool *has_subkey);
struct clingo_config clingo_config_t
Handle for to the solver configuration.
Definition config.h:46
CLINGO_VISIBILITY_DEFAULT bool clingo_config_array_at(clingo_config_t const *config, clingo_id_t key, size_t offset, clingo_id_t *subkey)
Get the subkey at the given offset of an array entry.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_value_get(clingo_config_t const *config, clingo_id_t key, clingo_string_t *value, bool *has_value)
Get the string value of the given entry.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_root(clingo_config_t const *config, clingo_id_t *key)
Get the root key of the configuration.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_type(clingo_config_t const *config, clingo_id_t key, clingo_config_type_bitset_t *type)
Get the type of a key.
unsigned clingo_config_type_bitset_t
Bitset for values of type clingo_config_type_e.
Definition config.h:43
CLINGO_VISIBILITY_DEFAULT bool clingo_config_map_subkey_name(clingo_config_t const *config, clingo_id_t key, size_t offset, clingo_string_t *name)
Get the name associated with the offset-th subkey.
clingo_config_type_e
Enumeration for entries of the configuration.
Definition config.h:37
CLINGO_VISIBILITY_DEFAULT bool clingo_control_config(clingo_control_t *control, clingo_config_t **config)
Get the configuration object.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_map_size(clingo_config_t const *config, clingo_id_t key, size_t *size)
Get the number of subkeys of a map entry.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_add(clingo_config_t *config, clingo_id_t parent, char const *name, size_t name_size, char const *description, size_t description_size, clingo_config_entry_t const *entry, void *data)
Add a custom configuration entry under a parent key.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_description(clingo_config_t const *config, clingo_id_t key, clingo_string_t *description)
Get the description of an entry.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_value_set(clingo_config_t *config, clingo_id_t key, char const *value, size_t size)
Set the value of an entry.
struct clingo_config_entry clingo_config_entry_t
Callback interface for custom configuration entries.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_map_at(clingo_config_t const *config, clingo_id_t key, char const *name, size_t size, clingo_id_t *subkey, bool *has_subkey)
Lookup a subkey under the given name.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_to_string(clingo_config_t const *config, clingo_id_t key, clingo_string_builder_t *builder)
Get the string representation of the given theory element.
CLINGO_VISIBILITY_DEFAULT bool clingo_config_array_size(clingo_config_t const *config, clingo_id_t key, size_t *size)
Get the size of an array entry.
@ clingo_config_type_array
the entry is an array
Definition config.h:39
@ clingo_config_type_map
the entry is a map
Definition config.h:40
@ clingo_config_type_value
the entry is a (string) value
Definition config.h:38
struct clingo_string_builder clingo_string_builder_t
A builder for strings.
Definition core.h:252
uint32_t clingo_id_t
Unsigned integer type used in various places.
Definition core.h:77
Callback interface for custom configuration entries.
Definition config.h:62
bool(* get)(size_t const *index, void *data, clingo_string_t *value, bool *has_value)
Get the value of this entry as a string.
Definition config.h:70
void(* free)(void *data)
Free the user data associated with this entry.
Definition config.h:92
bool(* size)(void *data, size_t *size, bool *has_size)
Get the size of this entry if it is an array.
Definition config.h:87
bool(* set)(size_t const *index, char const *value, size_t size, void *data)
Set the value of this entry from a string.
Definition config.h:79
Struct to capture strings that are not null-terminated.
Definition core.h:86