knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
QueryParser.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_QUERY_PARSER_H
7 #define KNOWROB_QUERY_PARSER_H
8 
9 #include "knowrob/formulas/Formula.h"
10 #include "knowrob/formulas/Predicate.h"
11 #include "knowrob/terms/Function.h"
12 #include "knowrob/semweb/GraphTerm.h"
13 
14 namespace knowrob {
18  class QueryParser {
19  public:
26  static FormulaPtr parse(const std::string &queryString);
27 
34  static PredicatePtr parsePredicate(const std::string &queryString);
35 
42  static std::shared_ptr<GraphTerm> parseGraphTerm(const std::string &queryString);
43 
50  static FunctionPtr parseFunction(const std::string &queryString);
51 
58  static TermPtr parseConstant(const std::string &queryString);
59 
66  static std::string parseRawAtom(const std::string &queryString);
67 
68  };
69 
70 } // knowrob
71 
72 #endif //KNOWROB_QUERY_PARSER_H
static FunctionPtr parseFunction(const std::string &queryString)
static std::string parseRawAtom(const std::string &queryString)
static TermPtr parseConstant(const std::string &queryString)
static PredicatePtr parsePredicate(const std::string &queryString)
static std::shared_ptr< GraphTerm > parseGraphTerm(const std::string &queryString)
static FormulaPtr parse(const std::string &queryString)
TermRule & string()
Definition: terms.cpp:63
std::shared_ptr< Term > TermPtr
Definition: Term.h:117
std::shared_ptr< Formula > FormulaPtr
Definition: Formula.h:99
std::shared_ptr< Predicate > PredicatePtr
Definition: Predicate.h:77
std::shared_ptr< Function > FunctionPtr
Definition: Function.h:73