knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
CurrentGraph.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_CURRENT_GRAPH_H
7 #define KNOWROB_CURRENT_GRAPH_H
8 
9 #include "string"
10 #include "set"
11 #include "map"
12 
13 namespace knowrob {
17  class CurrentGraph {
18  public:
19  explicit CurrentGraph(const std::string_view &name)
20  : name_(name) {}
21 
26  bool operator==(const CurrentGraph &other) const {
27  return name_ == other.name_;
28  }
29 
33  const auto &name() const { return name_; }
34 
38  const auto &directImports() const { return directImports_; }
39 
43  const auto &imports() const { return imports_; }
44 
45  protected:
46  const std::string name_;
47  std::set<CurrentGraph *> directImports_;
48  std::set<CurrentGraph *> imports_;
49 
50  friend class ImportHierarchy;
51  };
52 } // knowrob
53 
54 #endif //KNOWROB_CURRENT_GRAPH_H
const auto & name() const
Definition: CurrentGraph.h:33
CurrentGraph(const std::string_view &name)
Definition: CurrentGraph.h:19
std::set< CurrentGraph * > imports_
Definition: CurrentGraph.h:48
std::set< CurrentGraph * > directImports_
Definition: CurrentGraph.h:47
bool operator==(const CurrentGraph &other) const
Definition: CurrentGraph.h:26
const std::string name_
Definition: CurrentGraph.h:46
const auto & imports() const
Definition: CurrentGraph.h:43
const auto & directImports() const
Definition: CurrentGraph.h:38
TermRule & string()
Definition: terms.cpp:63