dlvhex  2.5.0
ModelCallback Class Reference

Callback functor for processing complete models of the HEX program. More...

#include <include/dlvhex2/PluginInterface.h>

Inheritance diagram for ModelCallback:

Public Member Functions

virtual ~ModelCallback ()
virtual bool operator() (AnswerSetPtr as)=0
 Method called for each complete model of the program.

Detailed Description

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.


Constructor & Destructor Documentation

virtual ModelCallback::~ModelCallback ( ) [inline, virtual]

Definition at line 1400 of file PluginInterface.h.


Member Function Documentation

virtual bool ModelCallback::operator() ( AnswerSetPtr  as) [pure virtual]

Method called for each complete model of the program.

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

Implemented in ProgramCtx::SubprogramAnswerSetCallback, CSVAnswerSetPrinterCallback, and AnswerSetPrinterCallback.


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