Clingo
Loading...
Searching...
No Matches
Applications on top of Clingo

Support for building applications on top of clingo. More...

Classes

class  Clingo::Options
 Object to add command-line options. More...
 
class  Clingo::App
 Interface to build applications on top of clingo. More...
 

Typedefs

using Clingo::ModelPrinter = std::function< void()>
 A callback to print the current model.
 

Functions

auto Clingo::main (Library &lib, std::span< std::string_view const > arguments={}, App *app=nullptr, bool raise_errors=false) -> int
 Run a clingo based application with the given arguments.
 
auto Clingo::main (Library &lib, std::initializer_list< std::string_view const > arguments, App *app=nullptr, bool raise_errors=false) -> int
 Run a clingo based application with the given arguments.
 

Detailed Description

Support for building applications on top of clingo.

Function Documentation

◆ main() [1/2]

auto Clingo::main ( Library lib,
std::initializer_list< std::string_view const arguments,
App app = nullptr,
bool  raise_errors = false 
) -> int
inline

Run a clingo based application with the given arguments.

Convenience overload to specify arguments via initializer_lists.

Parameters
libthe library to store symbols
argumentsthe command line arguments
appan optional application to customize solving
raise_errorswhether to raise or report errors
Returns
the exit code

◆ main() [2/2]

auto Clingo::main ( Library lib,
std::span< std::string_view const arguments = {},
App app = nullptr,
bool  raise_errors = false 
) -> int
inline

Run a clingo based application with the given arguments.

Parameters
libthe library to store symbols
argumentsthe command line arguments
appan optional application to customize solving
raise_errorswhether to raise or report errors
Returns
the exit code