clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | List of all members
Clasp::Cli::JsonOutput Class Reference

Prints models and solving statistics in Json-format to stdout. More...

#include <clasp_output.h>

Inheritance diagram for Clasp::Cli::JsonOutput:
Inheritance graph
Collaboration diagram for Clasp::Cli::JsonOutput:
Collaboration graph

Public Member Functions

 JsonOutput (uint32 verb)
 
 ~JsonOutput ()
 
virtual void run (const char *solver, const char *version, const std::string *begInput, const std::string *endInput)
 Shall be called once on startup. More...
 
virtual void shutdown (const ClaspFacade::Summary &summary)
 Shall be called once on shutdown. More...
 
virtual void shutdown ()
 
virtual void printSummary (const ClaspFacade::Summary &summary, bool final)
 Shall print the given summary. More...
 
virtual void printStatistics (const ClaspFacade::Summary &summary, bool final)
 Shall print the given statistics. More...
 
- Public Member Functions inherited from Clasp::Cli::Output
 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 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...
 
- 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)
 

Additional Inherited Members

- Public Types inherited from Clasp::Cli::Output
enum  PrintLevel { print_all = 0, print_best = 1, print_no = 2 }
 Supported levels for printing models, optimize values, and individual calls. More...
 
- Protected Member Functions inherited from Clasp::Cli::Output
const ModelgetModel () const
 
void saveModel (const Model &m)
 
void clearModel ()
 
bool doPrint (const SymbolTable::symbol_type &sym) const
 

Detailed Description

Prints models and solving statistics in Json-format to stdout.

Constructor & Destructor Documentation

Clasp::Cli::JsonOutput::JsonOutput ( uint32  verb)
explicit
Clasp::Cli::JsonOutput::~JsonOutput ( )

Here is the call graph for this function:

Member Function Documentation

void Clasp::Cli::JsonOutput::printStatistics ( const ClaspFacade::Summary summary,
bool  final 
)
virtual

Shall print the given statistics.

Implements Clasp::Cli::Output.

Here is the call graph for this function:

void Clasp::Cli::JsonOutput::printSummary ( const ClaspFacade::Summary summary,
bool  final 
)
virtual

Shall print the given summary.

Implements Clasp::Cli::Output.

Here is the call graph for this function:

void Clasp::Cli::JsonOutput::run ( const char *  solver,
const char *  version,
const std::string *  begInput,
const std::string *  endInput 
)
virtual

Shall be called once on startup.

Implements Clasp::Cli::Output.

void Clasp::Cli::JsonOutput::shutdown ( const ClaspFacade::Summary summary)
virtual

Shall be called once on shutdown.

Reimplemented from Clasp::Cli::Output.

Here is the call graph for this function:

void Clasp::Cli::JsonOutput::shutdown ( )
virtual

Implements Clasp::Cli::Output.


The documentation for this class was generated from the following files: