dlvhex  2.5.0
BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB Struct Reference

For usual model building where we want to collect all true answers as replacement atoms in an interpretation. More...

#include <include/dlvhex2/BaseModelGenerator.h>

Inheritance diagram for BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB:
Collaboration diagram for BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB:

Public Member Functions

 IntegrateExternalAnswerIntoInterpretationCB (InterpretationPtr outputi)
 Constructor.
virtual ~IntegrateExternalAnswerIntoInterpretationCB ()
virtual bool eatom (const ExternalAtom &eatom)
 Is called when the next eatom is encountered.
virtual bool input (const Tuple &input)
 Is called when the next input tuple is encountered.
virtual bool output (const Tuple &output)
 Is called when the next output tuple is encountered.

Protected Attributes

RegistryPtr reg
 RegistryPtr.
InterpretationPtr outputi
 See constructor.
OrdinaryAtom replacement
 Current replacement atom (temporary storage).

Detailed Description

For usual model building where we want to collect all true answers as replacement atoms in an interpretation.

Definition at line 287 of file BaseModelGenerator.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
outputiInterpretation to add the external atom output to.

Definition at line 144 of file BaseModelGenerator.cpp.


Member Function Documentation

Is called when the next eatom is encountered.

Parameters:
eatomThe external atom currently encountered.
Returns:
True if enumeration shall be continued als false to abort.

Implements BaseModelGenerator::ExternalAnswerTupleCallback.

Definition at line 155 of file BaseModelGenerator.cpp.

References ExternalAtom::predicate.

Is called when the next input tuple is encountered.

Preceded by eatom(...).

Parameters:
inputThe input tuple currently encountered.
Returns:
True if enumeration shall be continued als false to abort.

Implements BaseModelGenerator::ExternalAnswerTupleCallback.

Definition at line 169 of file BaseModelGenerator.cpp.

Is called when the next output tuple is encountered.

Preceded by eatom(...) even for empty input tuples.

Parameters:
eatomThe output tuple currently encountered.
Returns:
True if enumeration shall be continued als false to abort.

Implements BaseModelGenerator::ExternalAnswerTupleCallback.

Definition at line 186 of file BaseModelGenerator.cpp.

References ID::address, DBGLOG, and printrange().


Field Documentation

Current replacement atom (temporary storage).

Definition at line 309 of file BaseModelGenerator.h.


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