Interface to build applications on top of clingo.
More...
#include <app.hh>
|
| App ()=default |
| The default constructor.
|
|
| App (App &&other)=delete |
| Disable copying and moving.
|
|
auto | operator= (App &&other) -> App &=delete |
| Disable copying and moving.
|
|
virtual | ~App ()=default |
| The default destructor.
|
|
auto | program_name () noexcept -> std::string_view |
| Get the name of the application.
|
|
auto | program_version () noexcept -> std::string_view |
| Get the version of the application.
|
|
void | main (Control const &control, std::span< std::string_view const > files) |
| Run the main control flow.
|
|
void | print_model (ConstModel model, ModelPrinter const &printer) |
| Customize model printing.
|
|
void | register_options (Options options) |
| Optionally register additional application options.
|
|
void | validate_options () |
| Validate previously parsed options.
|
|
Interface to build applications on top of clingo.
◆ main()
void Clingo::App::main |
( |
Control const & |
control, |
|
|
std::span< std::string_view const > |
files |
|
) |
| |
|
inline |
Run the main control flow.
Does nothing by default.
- Parameters
-
control | the control object |
files | the files to parse |
◆ print_model()
Customize model printing.
Calls the default model printer by default.
- Parameters
-
model | the current model |
printer | the default model printer |
◆ program_name()
auto Clingo::App::program_name |
( |
| ) |
-> std::string_view |
|
inlinenoexcept |
Get the name of the application.
Returns "clingo" by default.
- Returns
- the name
◆ program_version()
auto Clingo::App::program_version |
( |
| ) |
-> std::string_view |
|
inlinenoexcept |
Get the version of the application.
Returns the clingo version by default.
- Returns
- the version
◆ register_options()
void Clingo::App::register_options |
( |
Options |
options | ) |
|
|
inline |
Optionally register additional application options.
- Parameters
-
options | the options object |
◆ validate_options()
void Clingo::App::validate_options |
( |
| ) |
|
|
inline |
Validate previously parsed options.
Should throw std::invalid_value if conflicting options are found.
The documentation for this class was generated from the following file: