knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
MongologReasoner.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022, Daniel Beßler
3  * All rights reserved.
4  *
5  * This file is part of KnowRob, please consult
6  * https://github.com/knowrob/knowrob for license details.
7  */
8 
9 #ifndef KNOWROB_MONGOLOG_REASONER_H_
10 #define KNOWROB_MONGOLOG_REASONER_H_
11 
12 // STD
13 #include <memory>
14 // KnowRob
15 #include "knowrob/terms/Term.h"
16 #include "knowrob/storage/mongo/MongoKnowledgeGraph.h"
17 #include "knowrob/reasoner/Reasoner.h"
18 #include "knowrob/reasoner/prolog/PrologReasoner.h"
19 
20 namespace knowrob {
21  class MongologReasoner : public PrologReasoner {
22  public:
24 
25  ~MongologReasoner() override;
26 
27  //bool projectIntoEDB(const Statement &statement) override;
28 
29  //bool exportData(const std::filesystem::path &path) override;
30 
31  //bool importData(const std::filesystem::path &path) override;
32 
33  bool initializeReasoner(const PropertyTree &cfg) override;
34 
35  const auto &knowledgeGraph() const { return knowledgeGraph_; }
36 
37  // Override PrologReasoner
38  void unload() override;
39 
40  protected:
41  std::shared_ptr<MongoKnowledgeGraph> knowledgeGraph_;
42 
43  // Override PrologReasoner
44  std::string_view callFunctor() override;
45 
46  // Override PrologReasoner
47  bool initializeDefaultPackages() override;
48 
49  // Override PrologReasoner
50  void initializeReasonerStorage() override { knowledgeGraph_ = getTypedStorage<MongoKnowledgeGraph>(); }
51  };
52 }
53 
54 #endif //KNOWROB_MONGOLOG_REASONER_H_
void initializeReasonerStorage() override
const auto & knowledgeGraph() const
bool initializeReasoner(const PropertyTree &cfg) override
std::string_view callFunctor() override
std::shared_ptr< MongoKnowledgeGraph > knowledgeGraph_
bool initializeDefaultPackages() override
void unload() override