knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
QueryContext.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_CONTEXT_H
7 #define KNOWROB_QUERY_CONTEXT_H
8 
9 #include <utility>
10 
11 #include "knowrob/formulas/ModalOperator.h"
12 #include "knowrob/semweb/GraphSelector.h"
13 #include "knowrob/queries/QueryFlag.h"
14 
15 namespace knowrob {
19  struct QueryContext {
21  : queryFlags(queryFlags), modalIteration(ModalIteration::emptyIteration()) {}
22 
23  QueryContext(const QueryContext &other, const ModalOperatorPtr &modalOperator)
24  : queryFlags(other.queryFlags), modalIteration(other.modalIteration + modalOperator) {
25  }
26 
30  int queryFlags;
39  };
40 
41  using QueryContextPtr = std::shared_ptr<const QueryContext>;
42 };
43 
44 #endif //KNOWROB_QUERY_CONTEXT_H
@ QUERY_FLAG_ALL_SOLUTIONS
Definition: QueryFlag.h:15
std::shared_ptr< const QueryContext > QueryContextPtr
Definition: QueryContext.h:41
std::shared_ptr< const ModalOperator > ModalOperatorPtr
QueryContext(const QueryContext &other, const ModalOperatorPtr &modalOperator)
Definition: QueryContext.h:23
GraphSelector selector
Definition: QueryContext.h:38
QueryContext(int queryFlags=QUERY_FLAG_ALL_SOLUTIONS)
Definition: QueryContext.h:20
ModalIteration modalIteration
Definition: QueryContext.h:34