Clingo
Loading...
Searching...
No Matches
CppClingo::Control::Scripts Class Reference

Helper to run specific code and callbacks. More...

#include <solver.hh>

Inheritance diagram for CppClingo::Control::Scripts:
CppClingo::Ground::ScriptCallback CppClingo::Ground::ScriptExec

Public Member Functions

void register_script (std::string_view name, UScript script)
 Register the given script.
 
void main (Solver &slv)
 Run the main function.
 
- Public Member Functions inherited from CppClingo::Ground::ScriptCallback
virtual ~ScriptCallback ()=default
 Virtual destructor.
 
auto callable (std::string_view name, size_t args) -> bool
 Check if the function with the given name and number of arguments is callable.
 
void call (Location const &loc, std::string_view name, SymbolSpan args, SymbolVec &out)
 Call the function with the given name and arguments.
 
- Public Member Functions inherited from CppClingo::Ground::ScriptExec
virtual ~ScriptExec ()=default
 Virtual destructor.
 
void exec (Location const &loc, Logger &log, std::string_view name, std::string_view code)
 Execute the given code for the given script.
 

Detailed Description

Helper to run specific code and callbacks.

Named scripts can be registered. Code, main, and callback execution and is dispatched to registered scripts.


The documentation for this class was generated from the following file: