dlvhex
2.5.0
|
Parses DLV answer sets. More...
#include <include/dlvhex2/DLVresultParserDriver.h>
Public Types | |
enum | ParseMode { FirstOrder, HO } |
Tells the parser how to postprocess the answer-set. More... | |
typedef boost::function< void(AnswerSet::Ptr)> | AnswerSetAdder |
Public Member Functions | |
DLVResultParser (RegistryPtr reg) | |
Constructor. | |
DLVResultParser (RegistryPtr reg, ParseMode mode) | |
Constructor. | |
virtual | ~DLVResultParser () |
Destructor. | |
void | setParseMode (ParseMode mode) |
This function changes the parse mode of this instance. | |
void | parse (std::istream &is, AnswerSetAdder answerSetAdder) throw (SyntaxError) |
This function parses input, registers newly parsed atoms if necessary, sets parsed atoms to true in the interpretation of the answer set sets weak weights if present in the answer set. | |
Protected Attributes | |
RegistryPtr | reg |
Registry. | |
ParseMode | pMode |
See DLVResultParser::ParseMode. |
Parses DLV answer sets.
Definition at line 54 of file DLVresultParserDriver.h.
typedef boost::function<void (AnswerSet::Ptr)> DLVResultParser::AnswerSetAdder |
Definition at line 71 of file DLVresultParserDriver.h.
Tells the parser how to postprocess the answer-set.
Default is FirstOrder.
Definition at line 60 of file DLVresultParserDriver.h.
Constructor.
reg | See DLVResultParser::reg. |
Definition at line 88 of file DLVresultParserDriver.cpp.
DLVResultParser::DLVResultParser | ( | RegistryPtr | reg, |
ParseMode | mode | ||
) |
Constructor.
reg | See DLVResultParser::reg. |
mode | See DLVResultParser::mode. |
Definition at line 95 of file DLVresultParserDriver.cpp.
DLVResultParser::~DLVResultParser | ( | ) | [virtual] |
Destructor.
Definition at line 102 of file DLVresultParserDriver.cpp.
void DLVResultParser::parse | ( | std::istream & | is, |
AnswerSetAdder | answerSetAdder | ||
) | throw (SyntaxError) |
This function parses input, registers newly parsed atoms if necessary, sets parsed atoms to true in the interpretation of the answer set sets weak weights if present in the answer set.
is | Input. |
answerSetAdder | Container where parsed answer sets are to be added. |
Definition at line 362 of file DLVresultParserDriver.cpp.
References DBGLOG, DLVHEX_BENCHMARK_REGISTER_AND_SCOPE, HO, and LOG.
void DLVResultParser::setParseMode | ( | ParseMode | mode | ) |
This function changes the parse mode of this instance.
mode | See DLVResultParser::ParseMode. |
Definition at line 108 of file DLVresultParserDriver.cpp.
References pMode.
ParseMode DLVResultParser::pMode [protected] |
See DLVResultParser::ParseMode.
Default is FirstOrder.
Definition at line 77 of file DLVresultParserDriver.h.
Referenced by setParseMode().
RegistryPtr DLVResultParser::reg [protected] |
Definition at line 75 of file DLVresultParserDriver.h.