dlvhex
2.5.0
|
Callback functor for processing complete models of the HEX program. More...
#include <include/dlvhex2/PluginInterface.h>
Public Member Functions | |
virtual | ~ModelCallback () |
virtual bool | operator() (AnswerSetPtr as)=0 |
Method called for each complete model of the program. |
Callback functor for processing complete models of the HEX program.
Setup such callbacks in PluginInterface::setupProgramCtx Register such callback in ProgramCtx::modelCallbacks A callback can abort the model building process.
Use this, e.g., for accumulating data over all models. (For an example see QueryPlugin.cpp.)
Definition at line 1396 of file PluginInterface.h.
virtual ModelCallback::~ModelCallback | ( | ) | [inline, virtual] |
Definition at line 1400 of file PluginInterface.h.
virtual bool ModelCallback::operator() | ( | AnswerSetPtr | as | ) | [pure virtual] |
Method called for each complete model of the program.
as | Pointer to the current answer set. |
Implemented in ProgramCtx::SubprogramAnswerSetCallback, CSVAnswerSetPrinterCallback, and AnswerSetPrinterCallback.