dlvhex  2.5.0
CSVAnswerSetPrinterCallback Class Reference

Printer for (parts of) answer sets in CVS format. More...

#include <include/dlvhex2/AnswerSetPrinterCallback.h>

Inheritance diagram for CSVAnswerSetPrinterCallback:
Collaboration diagram for CSVAnswerSetPrinterCallback:

Public Member Functions

 CSVAnswerSetPrinterCallback (ProgramCtx &ctx, const std::string &predicate)
 Constructor.
virtual bool operator() (AnswerSetPtr model)
 Method called for each answer set of the program.

Protected Attributes

PredicateMaskPtr filterpm
 Mask representing the set of all atoms which specify CVS output.
bool firstas
 True until first answer set was printed.

Detailed Description

Printer for (parts of) answer sets in CVS format.

Definition at line 67 of file AnswerSetPrinterCallback.h.


Constructor & Destructor Documentation

CSVAnswerSetPrinterCallback::CSVAnswerSetPrinterCallback ( ProgramCtx ctx,
const std::string &  predicate 
)

Constructor.

Parameters:
ctxProgramCtx.

Definition at line 138 of file AnswerSetPrinterCallback.cpp.

References filterpm, and ProgramCtx::registry().


Member Function Documentation

bool CSVAnswerSetPrinterCallback::operator() ( AnswerSetPtr  model) [virtual]

Method called for each answer set of the program.

Parameters:
modelPointer to the current answer set.
Returns:
True continues the model generation process, false stops the model generation process.

Implements ModelCallback.

Definition at line 152 of file AnswerSetPrinterCallback.cpp.

References DLVHEX_BENCHMARK_REGISTER_AND_SCOPE, bm::bvector< Alloc >::end(), filterpm, bm::bvector< Alloc >::first(), firstas, and Atom::tuple.


Field Documentation

Mask representing the set of all atoms which specify CVS output.

Definition at line 84 of file AnswerSetPrinterCallback.h.

Referenced by CSVAnswerSetPrinterCallback(), and operator()().

True until first answer set was printed.

Definition at line 86 of file AnswerSetPrinterCallback.h.

Referenced by operator()().


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