Clingo
|
Interface for custom scripts. More...
#include <script.hh>
Public Member Functions | |
Script ()=default | |
The default constructor. | |
Script (Script &&other)=delete | |
Disable copy and move operations. | |
virtual | ~Script ()=default |
The default destructor. | |
void | execute (std::string_view code) |
Callback to execute the given code. | |
auto | call (Library &lib, std::string_view name, SymbolSpan arguments) -> SymbolVector |
Callback to call the function with the given name and arguments. | |
auto | callable (std::string_view name, size_t arguments) -> bool |
Callback to check if the given signature is callable. | |
void | main (Library &lib, const Control &ctl) |
Callback to customize the main function. | |
auto | name () -> std::string_view |
Get the name of the script. | |
auto | version () -> std::string_view |
Get the version of the script. | |
Interface for custom scripts.
|
inline |
Callback to call the function with the given name and arguments.
lib | the library object for storing symbols |
name | the name of the function to call |
arguments | the arguments to the function |
Callback to check if the given signature is callable.
name | the name of the function to check |
arguments | the number of arguments of the function |
|
inline |
Callback to execute the given code.
code | the code to execute |
Callback to customize the main function.
lib | the library object for storing symbols |
ctl | the control object |
|
inline |
Get the name of the script.
|
inline |
Get the version of the script.