#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 | |
| int | callQ () const |
| Print level for individual (solve) calls. | |
| int | modelQ () const |
| Print level for models. | |
| virtual void | onEvent (const Event &ev) |
| Handles ClaspFacade events by forwarding calls to startStep() and stopStep(). | |
| virtual bool | onModel (const Solver &s, const Model &m) |
| Checks quiet-levels and forwards to printModel() if appropriate. | |
| int | optQ () const |
| Print level for optimization values. | |
| Output (uint32 verb=1) | |
| virtual void | printModel (const SymbolTable &sym, const Model &m, PrintLevel x)=0 |
| Shall print the given model. | |
| virtual void | printStatistics (const ClaspFacade::Summary &summary, bool final)=0 |
| Shall print the given statistics. | |
| virtual void | printSummary (const ClaspFacade::Summary &summary, bool final)=0 |
| Shall print the given summary. | |
| bool | quiet () const |
| Do not output any models? | |
| virtual void | run (const char *solver, const char *version, const std::string *begInput, const std::string *endInput)=0 |
| Shall be called once on startup. | |
| void | setCallQuiet (PrintLevel call) |
| void | setHide (char c) |
| void | setModelQuiet (PrintLevel model) |
| void | setOptQuiet (PrintLevel opt) |
| void | setVerbosity (uint32 verb) |
| virtual void | shutdown (const ClaspFacade::Summary &summary) |
| Shall be called once on shutdown. | |
| virtual void | shutdown ()=0 |
| virtual void | startStep (const ClaspFacade &) |
| A solving step has started. | |
| virtual void | stopStep (const ClaspFacade::Summary &summary) |
| A solving step has stopped. | |
| uint32 | verbosity () const |
| Active verbosity level. | |
| virtual | ~Output () |
Protected Member Functions | |
| void | clearModel () |
| bool | doPrint (const SymbolTable::symbol_type &sym) const |
| const Model * | getModel () const |
| void | saveModel (const Model &m) |
Private Types | |
| typedef const ClaspFacade::Summary * | SumPtr |
Private Member Functions | |
| Output & | operator= (const Output &) |
| Output (const Output &) | |
Private Attributes | |
| char | hidePref_ |
| uint8 | quiet_ [3] |
| Model | saved_ |
| SumPtr | summary_ |
| ValueVec | vals_ |
| uint32 | verbose_ |
Interface for printing status and input format dependent information, like models, optimization values, and summaries.
Definition at line 37 of file clasp_output.h.
typedef const ClaspFacade::Summary* Clasp::Cli::Output::SumPtr [private] |
Definition at line 94 of file clasp_output.h.
Supported levels for printing models, optimize values, and individual calls.
| print_all |
Print all models, optimize values, or calls. |
| print_best |
Only print last model, optimize value, or call. |
| print_no |
Do not print any models, optimize values, or calls. |
Definition at line 40 of file clasp_output.h.
| Clasp::Cli::Output::Output | ( | uint32 | verb = 1 | ) | [explicit] |
Definition at line 90 of file clasp_output.cpp.
| Clasp::Cli::Output::~Output | ( | ) | [virtual] |
Definition at line 95 of file clasp_output.cpp.
| Clasp::Cli::Output::Output | ( | const Output & | ) | [private] |
| int Clasp::Cli::Output::callQ | ( | ) | const [inline] |
Print level for individual (solve) calls.
Definition at line 56 of file clasp_output.h.
| void Clasp::Cli::Output::clearModel | ( | ) | [inline, protected] |
Definition at line 87 of file clasp_output.h.
| bool Clasp::Cli::Output::doPrint | ( | const SymbolTable::symbol_type & | sym | ) | const [inline, protected] |
Definition at line 88 of file clasp_output.h.
| const Model* Clasp::Cli::Output::getModel | ( | ) | const [inline, protected] |
Definition at line 85 of file clasp_output.h.
| int Clasp::Cli::Output::modelQ | ( | ) | const [inline] |
Print level for models.
Definition at line 52 of file clasp_output.h.
| void Clasp::Cli::Output::onEvent | ( | const Event & | ev | ) | [virtual] |
Handles ClaspFacade events by forwarding calls to startStep() and stopStep().
Reimplemented from Clasp::EventHandler.
Reimplemented in Clasp::Cli::TextOutput.
Definition at line 115 of file clasp_output.cpp.
| bool Clasp::Cli::Output::onModel | ( | const Solver & | s, |
| const Model & | m | ||
| ) | [virtual] |
Checks quiet-levels and forwards to printModel() if appropriate.
Reimplemented from Clasp::EventHandler.
Definition at line 125 of file clasp_output.cpp.
| int Clasp::Cli::Output::optQ | ( | ) | const [inline] |
Print level for optimization values.
Definition at line 54 of file clasp_output.h.
| virtual void Clasp::Cli::Output::printModel | ( | const SymbolTable & | sym, |
| const Model & | m, | ||
| PrintLevel | x | ||
| ) | [pure virtual] |
Shall print the given model.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
| virtual void Clasp::Cli::Output::printStatistics | ( | const ClaspFacade::Summary & | summary, |
| bool | final | ||
| ) | [pure virtual] |
Shall print the given statistics.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
| virtual void Clasp::Cli::Output::printSummary | ( | const ClaspFacade::Summary & | summary, |
| bool | final | ||
| ) | [pure virtual] |
Shall print the given summary.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
| bool Clasp::Cli::Output::quiet | ( | ) | const [inline] |
Do not output any models?
Definition at line 50 of file clasp_output.h.
| virtual void Clasp::Cli::Output::run | ( | const char * | solver, |
| const char * | version, | ||
| const std::string * | begInput, | ||
| const std::string * | endInput | ||
| ) | [pure virtual] |
Shall be called once on startup.
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
| void Clasp::Cli::Output::saveModel | ( | const Model & | m | ) | [protected] |
Definition at line 109 of file clasp_output.cpp.
| void Clasp::Cli::Output::setCallQuiet | ( | PrintLevel | call | ) |
Definition at line 106 of file clasp_output.cpp.
| void Clasp::Cli::Output::setHide | ( | char | c | ) |
Definition at line 107 of file clasp_output.cpp.
| void Clasp::Cli::Output::setModelQuiet | ( | PrintLevel | model | ) |
Definition at line 104 of file clasp_output.cpp.
| void Clasp::Cli::Output::setOptQuiet | ( | PrintLevel | opt | ) |
Definition at line 105 of file clasp_output.cpp.
| void Clasp::Cli::Output::setVerbosity | ( | uint32 | verb | ) |
Definition at line 96 of file clasp_output.cpp.
| void Clasp::Cli::Output::shutdown | ( | const ClaspFacade::Summary & | summary | ) | [virtual] |
Shall be called once on shutdown.
Reimplemented in Clasp::Cli::JsonOutput.
Definition at line 149 of file clasp_output.cpp.
| virtual void Clasp::Cli::Output::shutdown | ( | ) | [pure virtual] |
Implemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
| void Clasp::Cli::Output::startStep | ( | const ClaspFacade & | ) | [virtual] |
A solving step has started.
Reimplemented in Clasp::Cli::TextOutput, and Clasp::Cli::JsonOutput.
Definition at line 135 of file clasp_output.cpp.
| void Clasp::Cli::Output::stopStep | ( | const ClaspFacade::Summary & | summary | ) | [virtual] |
A solving step has stopped.
Reimplemented in Clasp::Cli::JsonOutput.
Definition at line 136 of file clasp_output.cpp.
| uint32 Clasp::Cli::Output::verbosity | ( | ) | const [inline] |
Active verbosity level.
Definition at line 48 of file clasp_output.h.
char Clasp::Cli::Output::hidePref_ [private] |
Definition at line 100 of file clasp_output.h.
uint8 Clasp::Cli::Output::quiet_[3] [private] |
Definition at line 99 of file clasp_output.h.
Model Clasp::Cli::Output::saved_ [private] |
Definition at line 97 of file clasp_output.h.
SumPtr Clasp::Cli::Output::summary_ [private] |
Definition at line 95 of file clasp_output.h.
ValueVec Clasp::Cli::Output::vals_ [private] |
Definition at line 96 of file clasp_output.h.
uint32 Clasp::Cli::Output::verbose_ [private] |
Definition at line 98 of file clasp_output.h.