6 #include <knowrob/reasoner/RDFGoal.h>
9 #include "knowrob/integration/python/utils.h"
13 static SimpleConjunctionPtr makeSimpleConjunction(
const std::vector<TriplePatternPtr> &literals) {
14 std::vector<FirstOrderLiteralPtr> firstOrderLiterals;
15 firstOrderLiterals.reserve(literals.size());
16 for (
const auto &literal : literals) {
17 firstOrderLiterals.push_back(literal);
19 return std::make_shared<SimpleConjunction>(firstOrderLiterals);
23 :
Goal(makeSimpleConjunction(literals), goal), rdfLiterals_(literals) {
27 :
Goal(makeSimpleConjunction(literals), ctx), rdfLiterals_(literals) {
31 :
Goal(literal, ctx), rdfLiterals_({literal}) {
39 class_<RDFGoal, std::shared_ptr<RDFGoal>, bases<Goal>>
40 (
"RDFGoal", init<const std::vector<TriplePatternPtr> &,
QueryContextPtr>())
41 .def(init<const TriplePatternPtr &, QueryContextPtr>())
auto & rdfLiterals() const
RDFGoal(const std::vector< TriplePatternPtr > &literals, const QueryContextPtr &ctx=DefaultQueryContext())
void createType< RDFGoal >()
std::shared_ptr< TriplePattern > TriplePatternPtr
std::shared_ptr< SimpleConjunction > SimpleConjunctionPtr
std::shared_ptr< const QueryContext > QueryContextPtr