Public Member Functions | Private Types | Private Member Functions | Private Attributes
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
[legend]

List of all members.

Public Member Functions

 JsonOutput (uint32 verb)
virtual void printStatistics (const ClaspFacade::Summary &summary, bool final)
 Shall print the given statistics.
virtual void printSummary (const ClaspFacade::Summary &summary, bool final)
 Shall print the given summary.
virtual void run (const char *solver, const char *version, const std::string *begInput, const std::string *endInput)
 Shall be called once on startup.
virtual void shutdown (const ClaspFacade::Summary &summary)
 Shall be called once on shutdown.
virtual void shutdown ()
 ~JsonOutput ()

Private Types

enum  ObjType { type_object, type_array }

Private Member Functions

bool hasWitness () const
uint32 indent () const
char popObject ()
void printCosts (const SharedMinimizeData &costs)
void printKey (const char *k)
void printKeyValue (const char *k, const char *v)
void printKeyValue (const char *k, uint64 v)
void printKeyValue (const char *k, uint32 v)
void printKeyValue (const char *k, double d)
void printModel (const SymbolTable &sym, const Model &m, PrintLevel x)
 Shall print the given model.
void printString (const char *s, const char *sep)
void pushObject (const char *k=0, ObjType t=type_object)
void startModel ()
virtual void startStep (const ClaspFacade &)
 A solving step has started.
virtual void stopStep (const ClaspFacade::Summary &summary)
 A solving step has stopped.
virtual void visitCoreSolverStats (double cpuTime, uint64 models, const SolverStats &stats, bool accu)
virtual void visitExtSolverStats (const ExtendedStats &stats, bool accu)
virtual void visitHcc (uint32 i, const SharedContext &ctx)
virtual void visitHccs (const SharedContext &ctx)
virtual void visitJumpStats (const JumpStats &stats, bool accu)
virtual void visitLogicProgramStats (const Asp::LpStats &stats)
virtual void visitProblemStats (const ProblemStats &stats)
virtual void visitThread (uint32 i, const SolverStats &stats)
virtual void visitThreads (const SharedContext &ctx)

Private Attributes

std::string objStack_
const char * open_

Detailed Description

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

Definition at line 127 of file clasp_output.h.


Member Enumeration Documentation

Enumerator:
type_object 
type_array 

Definition at line 148 of file clasp_output.h.


Constructor & Destructor Documentation

Clasp::Cli::JsonOutput::JsonOutput ( uint32  verb) [explicit]

Definition at line 215 of file clasp_output.cpp.

Definition at line 218 of file clasp_output.cpp.


Member Function Documentation

bool Clasp::Cli::JsonOutput::hasWitness ( ) const [inline, private]

Definition at line 160 of file clasp_output.h.

uint32 Clasp::Cli::JsonOutput::indent ( ) const [inline, private]

Definition at line 161 of file clasp_output.h.

Definition at line 453 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printCosts ( const SharedMinimizeData costs) [private]

Definition at line 498 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printKey ( const char *  k) [private]

Definition at line 405 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printKeyValue ( const char *  k,
const char *  v 
) [private]

Definition at line 426 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printKeyValue ( const char *  k,
uint64  v 
) [private]

Definition at line 431 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printKeyValue ( const char *  k,
uint32  v 
) [private]

Definition at line 435 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printKeyValue ( const char *  k,
double  d 
) [private]

Definition at line 436 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printModel ( const SymbolTable sym,
const Model m,
PrintLevel  x 
) [private, virtual]

Shall print the given model.

Implements Clasp::Cli::Output.

Definition at line 468 of file clasp_output.cpp.

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

Shall print the given statistics.

Implements Clasp::Cli::Output.

Definition at line 543 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::printString ( const char *  s,
const char *  sep 
) [private]

Definition at line 410 of file clasp_output.cpp.

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

Shall print the given summary.

Implements Clasp::Cli::Output.

Definition at line 509 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::pushObject ( const char *  k = 0,
ObjType  t = type_object 
) [private]

Definition at line 441 of file clasp_output.cpp.

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.

Definition at line 219 of file clasp_output.cpp.

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

Shall be called once on shutdown.

Reimplemented from Clasp::Cli::Output.

Definition at line 233 of file clasp_output.cpp.

Implements Clasp::Cli::Output.

Definition at line 240 of file clasp_output.cpp.

Definition at line 461 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::startStep ( const ClaspFacade ) [private, virtual]

A solving step has started.

Reimplemented from Clasp::Cli::Output.

Definition at line 247 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::stopStep ( const ClaspFacade::Summary summary) [private, virtual]

A solving step has stopped.

Reimplemented from Clasp::Cli::Output.

Definition at line 251 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::visitCoreSolverStats ( double  cpuTime,
uint64  models,
const SolverStats stats,
bool  accu 
) [private, virtual]

Implements Clasp::Cli::StatsVisitor.

Definition at line 257 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::visitExtSolverStats ( const ExtendedStats stats,
bool  accu 
) [private, virtual]

Implements Clasp::Cli::StatsVisitor.

Definition at line 271 of file clasp_output.cpp.

virtual void Clasp::Cli::JsonOutput::visitHcc ( uint32  i,
const SharedContext ctx 
) [inline, private, virtual]

Reimplemented from Clasp::Cli::StatsVisitor.

Definition at line 142 of file clasp_output.h.

virtual void Clasp::Cli::JsonOutput::visitHccs ( const SharedContext ctx) [inline, private, virtual]

Reimplemented from Clasp::Cli::StatsVisitor.

Definition at line 140 of file clasp_output.h.

void Clasp::Cli::JsonOutput::visitJumpStats ( const JumpStats stats,
bool  accu 
) [private, virtual]

Implements Clasp::Cli::StatsVisitor.

Definition at line 326 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::visitLogicProgramStats ( const Asp::LpStats stats) [private, virtual]

Implements Clasp::Cli::StatsVisitor.

Definition at line 343 of file clasp_output.cpp.

void Clasp::Cli::JsonOutput::visitProblemStats ( const ProblemStats stats) [private, virtual]

Implements Clasp::Cli::StatsVisitor.

Definition at line 391 of file clasp_output.cpp.

virtual void Clasp::Cli::JsonOutput::visitThread ( uint32  i,
const SolverStats stats 
) [inline, private, virtual]

Reimplemented from Clasp::Cli::StatsVisitor.

Definition at line 141 of file clasp_output.h.

virtual void Clasp::Cli::JsonOutput::visitThreads ( const SharedContext ctx) [inline, private, virtual]

Reimplemented from Clasp::Cli::StatsVisitor.

Definition at line 139 of file clasp_output.h.


Member Data Documentation

std::string Clasp::Cli::JsonOutput::objStack_ [private]

Definition at line 163 of file clasp_output.h.

const char* Clasp::Cli::JsonOutput::open_ [private]

Definition at line 162 of file clasp_output.h.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41