Custom scripting language to run functions during grounding.
More...
#include <script.h>
|
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.
◆ call
Call the function with the given name and arguments.
- Parameters
-
[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 |
- Returns
- whether the function call was successful
◆ callable
bool(* clingo_script::callable) (char const *name, size_t size, size_t arguments, bool *result, void *data) |
Check if the given function is callable.
- Parameters
-
[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 |
- Returns
- whether the function call was successful
◆ execute
bool(* clingo_script::execute) (char const *code, size_t size, void *data) |
Evaluate the given source code.
- Parameters
-
[in] | code | the code to evaluate |
[in] | data | user data as given when registering the script |
- Returns
- whether the function call was successful
◆ free
void(* clingo_script::free) (void *data) |
This function is called once when the script is deleted.
- Parameters
-
[in] | data | user data as given when registering the script |
◆ main
bool(* clingo_script::main) (clingo_lib_t *lib, clingo_control_t *control, void *data) |
Run the main function.
- Parameters
-
[in] | control | the control object to pass to the main function |
[in] | data | user data as given when registering the script |
- Returns
- whether the function call was successful
◆ name
Get the name of the script.
- Returns
- the name of the script.
◆ version
Get the version of the script.
- Returns
- the version of the script.
The documentation for this struct was generated from the following file: