knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
ReifiedQuery.cpp File Reference
#include <utility>
#include "knowrob/storage/ReifiedQuery.h"
#include "knowrob/semweb/rdf.h"
#include "knowrob/storage/reification.h"
#include "knowrob/semweb/Property.h"
#include "knowrob/queries/QueryError.h"
Include dependency graph for ReifiedQuery.cpp:

Go to the source code of this file.

Functions

std::shared_ptr< TriplePatternaddPattern (const std::shared_ptr< GraphSequence > &sequence, const TermPtr &s, const TermPtr &p, const TermPtr &o, const groundable< Atom > &g)
 

Function Documentation

◆ addPattern()

std::shared_ptr<TriplePattern> addPattern ( const std::shared_ptr< GraphSequence > &  sequence,
const TermPtr s,
const TermPtr p,
const TermPtr o,
const groundable< Atom > &  g 
)

Definition at line 97 of file ReifiedQuery.cpp.

102  {
103  auto reified = std::make_shared<TriplePattern>(s, p, o);
104  if (g.has_grounding()) {
105  reified->setGraphName(g.grounded()->stringForm());
106  }
107  sequence->addPattern(reified);
108  return reified;
109 }
auto grounded() const
Definition: groundable.h:102
bool has_grounding() const
Definition: groundable.h:92