Clingo
|
Custom scripting language to run functions during grounding. More...
#include <script.h>
Public Attributes | |
bool(* | execute )(char const *code, size_t size, void *data) |
Evaluate the given source code. | |
bool(* | call )(clingo_lib_t *lib, clingo_location_t const *loc, char const *name, size_t name_size, clingo_symbol_t const *arguments, size_t arguments_size, clingo_symbol_callback_t symbol_callback, void *symbol_callback_data, void *data) |
Call the function with the given name and arguments. | |
bool(* | callable )(char const *name, size_t size, size_t arguments, bool *result, void *data) |
Check if the given function is callable. | |
bool(* | main )(clingo_lib_t *lib, clingo_control_t *control, void *data) |
Run the main function. | |
void(* | name )(void *data, clingo_string_t *name) |
Get the name of the script. | |
void(* | version )(void *data, clingo_string_t *version) |
Get the version of the script. | |
void(* | free )(void *data) |
This function is called once when the script is deleted. | |
Custom scripting language to run functions during grounding.
bool(* clingo_script::call) (clingo_lib_t *lib, clingo_location_t const *loc, char const *name, size_t name_size, clingo_symbol_t const *arguments, size_t arguments_size, clingo_symbol_callback_t symbol_callback, void *symbol_callback_data, void *data) |
Call the function with the given name and arguments.
[in] | lib | library object |
[in] | name | the name of the function |
[in] | arguments | the arguments to the function |
[in] | arguments_size | the number of arguments |
[in] | symbol_callback | callback to return a pool of symbols |
[in] | symbol_callback_data | user data for the symbol callback |
[in] | data | user data as given when registering the script |
bool(* clingo_script::callable) (char const *name, size_t size, size_t arguments, bool *result, void *data) |
Check if the given function is callable.
[in] | name | the name of the function |
[in] | arguments | the number of arguments |
[out] | result | whether the function is callable |
[in] | data | user data as given when registering the script |
Evaluate the given source code.
[in] | code | the code to evaluate |
[in] | data | user data as given when registering the script |
This function is called once when the script is deleted.
[in] | data | user data as given when registering the script |
bool(* clingo_script::main) (clingo_lib_t *lib, clingo_control_t *control, void *data) |
Run the main function.
[in] | control | the control object to pass to the main function |
[in] | data | user data as given when registering the script |
void(* clingo_script::name) (void *data, clingo_string_t *name) |
Get the name of the script.
void(* clingo_script::version) (void *data, clingo_string_t *version) |
Get the version of the script.