dlvhex
2.5.0
|
For usual model building where we want to collect all true answers as replacement atoms in an interpretation. More...
#include <include/dlvhex2/BaseModelGenerator.h>
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). |
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.
BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::IntegrateExternalAnswerIntoInterpretationCB | ( | InterpretationPtr | outputi | ) |
Constructor.
outputi | Interpretation to add the external atom output to. |
Definition at line 144 of file BaseModelGenerator.cpp.
virtual BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::~IntegrateExternalAnswerIntoInterpretationCB | ( | ) | [inline, virtual] |
Definition at line 296 of file BaseModelGenerator.h.
bool BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::eatom | ( | const ExternalAtom & | eatom | ) | [virtual] |
Is called when the next eatom is encountered.
eatom | The external atom currently encountered. |
Implements BaseModelGenerator::ExternalAnswerTupleCallback.
Definition at line 155 of file BaseModelGenerator.cpp.
References ExternalAtom::predicate.
bool BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::input | ( | const Tuple & | input | ) | [virtual] |
Is called when the next input tuple is encountered.
Preceded by eatom(...).
input | The input tuple currently encountered. |
Implements BaseModelGenerator::ExternalAnswerTupleCallback.
Definition at line 169 of file BaseModelGenerator.cpp.
bool BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::output | ( | const Tuple & | output | ) | [virtual] |
Is called when the next output tuple is encountered.
Preceded by eatom(...) even for empty input tuples.
eatom | The output tuple currently encountered. |
Implements BaseModelGenerator::ExternalAnswerTupleCallback.
Definition at line 186 of file BaseModelGenerator.cpp.
References ID::address, DBGLOG, and printrange().
InterpretationPtr BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::outputi [protected] |
See constructor.
Definition at line 307 of file BaseModelGenerator.h.
RegistryPtr.
Definition at line 305 of file BaseModelGenerator.h.
OrdinaryAtom BaseModelGenerator::IntegrateExternalAnswerIntoInterpretationCB::replacement [protected] |
Current replacement atom (temporary storage).
Definition at line 309 of file BaseModelGenerator.h.