knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
FormulaQuery.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_FORMULA_QUERY_H_
7 #define KNOWROB_FORMULA_QUERY_H_
8 
9 #include <knowrob/queries/Query.h>
10 #include <utility>
11 
12 namespace knowrob {
16  class FormulaQuery : public Query {
17  public:
23 
24  // Override Query
25  const FormulaPtr &formula() const { return formula_; }
26 
27  // Override Printable
28  void write(std::ostream &os) const override { os << *formula_; }
29 
30  protected:
31  const std::shared_ptr<Formula> formula_;
32  };
33 }
34 
35 #endif //KNOWROB_FORMULA_QUERY_H_
FormulaQuery(FormulaPtr formula, const QueryContextPtr &ctx)
Definition: FormulaQuery.h:22
const FormulaPtr & formula() const
Definition: FormulaQuery.h:25
const std::shared_ptr< Formula > formula_
Definition: FormulaQuery.h:31
void write(std::ostream &os) const override
Definition: FormulaQuery.h:28
auto & ctx() const
Definition: Query.h:41
std::shared_ptr< Formula > FormulaPtr
Definition: Formula.h:99
std::shared_ptr< const QueryContext > QueryContextPtr
Definition: QueryContext.h:41