dlvhex
2.5.0
|
Printer for (parts of) answer sets in CVS format. More...
#include <include/dlvhex2/AnswerSetPrinterCallback.h>
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. |
Printer for (parts of) answer sets in CVS format.
Definition at line 67 of file AnswerSetPrinterCallback.h.
CSVAnswerSetPrinterCallback::CSVAnswerSetPrinterCallback | ( | ProgramCtx & | ctx, |
const std::string & | predicate | ||
) |
Constructor.
ctx | ProgramCtx. |
Definition at line 138 of file AnswerSetPrinterCallback.cpp.
References filterpm, and ProgramCtx::registry().
bool CSVAnswerSetPrinterCallback::operator() | ( | AnswerSetPtr | model | ) | [virtual] |
Method called for each answer set of the program.
model | Pointer to the current answer set. |
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.
Mask representing the set of all atoms which specify CVS output.
Definition at line 84 of file AnswerSetPrinterCallback.h.
Referenced by CSVAnswerSetPrinterCallback(), and operator()().
bool CSVAnswerSetPrinterCallback::firstas [protected] |
True until first answer set was printed.
Definition at line 86 of file AnswerSetPrinterCallback.h.
Referenced by operator()().