Clingo
Loading...
Searching...
No Matches
Scripting Support for Grounding

Support for external functions solving customizations. More...

Classes

class  Clingo::Script
 Interface for custom scripts. More...
 

Functions

template<Detail::UserData< Script, false > T>
auto Clingo::register_script (Library const &lib, T &&script) -> decltype(auto)
 Register the given script with the library.
 

Detailed Description

Support for external functions solving customizations.

This module provides an interface to implement custom scripts that can be used to provide external functions callable during grounding and to customize the main application flow.

Function Documentation

◆ register_script()

template<Detail::UserData< Script, false > T>
auto Clingo::register_script ( Library const &  lib,
T &&  script 
) -> decltype(auto)

Register the given script with the library.

The script can be passed by value, std::ref, or std::unique_ptr.

Parameters
libthe library to register the script with
scriptthe script to register
Returns
a reference to the registered script