clingo
|
#include <clasp_output.h>
Public Types | |
enum | PrintLevel { print_all = 0, print_best = 1, print_no = 2 } |
Supported levels for printing models, optimize values, and individual calls. More... | |
Public Member Functions | |
Output (uint32 verb=1) | |
virtual | ~Output () |
uint32 | verbosity () const |
Active verbosity level. More... | |
bool | quiet () const |
Do not output any models? More... | |
int | modelQ () const |
Print level for models. More... | |
int | optQ () const |
Print level for optimization values. More... | |
int | callQ () const |
Print level for individual (solve) calls. More... | |
void | setVerbosity (uint32 verb) |
void | setModelQuiet (PrintLevel model) |
void | setOptQuiet (PrintLevel opt) |
void | setCallQuiet (PrintLevel call) |
void | setHide (char c) |
virtual void | run (const char *solver, const char *version, const std::string *begInput, const std::string *endInput)=0 |
Shall be called once on startup. More... | |
virtual void | shutdown (const ClaspFacade::Summary &summary) |
Shall be called once on shutdown. More... | |
virtual void | shutdown ()=0 |
virtual void | onEvent (const Event &ev) |
Handles ClaspFacade events by forwarding calls to startStep() and stopStep(). More... | |
virtual bool | onModel (const Solver &s, const Model &m) |
Checks quiet-levels and forwards to printModel() if appropriate. More... | |
virtual void | printModel (const SymbolTable &sym, const Model &m, PrintLevel x)=0 |
Shall print the given model. More... | |
virtual void | startStep (const ClaspFacade &) |
A solving step has started. More... | |
virtual void | stopStep (const ClaspFacade::Summary &summary) |
A solving step has stopped. More... | |
virtual void | printSummary (const ClaspFacade::Summary &summary, bool final)=0 |
Shall print the given summary. More... | |
virtual void | printStatistics (const ClaspFacade::Summary &summary, bool final)=0 |
Shall print the given statistics. More... | |
Public Member Functions inherited from Clasp::EventHandler | |
EventHandler (Event::Verbosity verbosity=Event::verbosity_quiet) | |
virtual | ~EventHandler () |
void | setVerbosity (Event::Subsystem sys, Event::Verbosity verb) |
void | dispatch (const Event &ev) |
Protected Member Functions | |
const Model * | getModel () const |
void | saveModel (const Model &m) |
void | clearModel () |
bool | doPrint (const SymbolTable::symbol_type &sym) const |
Interface for printing status and input format dependent information, like models, optimization values, and summaries.
|
explicit |
|
virtual |
|
inline |
Print level for individual (solve) calls.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
Print level for models.
|
virtual |
Handles ClaspFacade events by forwarding calls to startStep() and stopStep().
Reimplemented from Clasp::EventHandler.
Reimplemented in Clasp::Cli::TextOutput.
Checks quiet-levels and forwards to printModel() if appropriate.
Reimplemented from Clasp::EventHandler.
|
inline |
Print level for optimization values.
|
pure virtual |
Shall print the given model.
Implemented in Clasp::Cli::TextOutput.
|
pure virtual |
Shall print the given statistics.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
|
pure virtual |
Shall print the given summary.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
|
inline |
Do not output any models?
|
pure virtual |
Shall be called once on startup.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
|
protected |
void Clasp::Cli::Output::setCallQuiet | ( | PrintLevel | call | ) |
void Clasp::Cli::Output::setHide | ( | char | c | ) |
void Clasp::Cli::Output::setModelQuiet | ( | PrintLevel | model | ) |
void Clasp::Cli::Output::setOptQuiet | ( | PrintLevel | opt | ) |
void Clasp::Cli::Output::setVerbosity | ( | uint32 | verb | ) |
|
virtual |
Shall be called once on shutdown.
Reimplemented in Clasp::Cli::JsonOutput.
|
pure virtual |
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
|
virtual |
A solving step has started.
Reimplemented in Clasp::Cli::TextOutput.
|
virtual |
A solving step has stopped.
|
inline |
Active verbosity level.