knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
GraphSelector.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_GRAPH_SELECTOR_H
7 #define KNOWROB_GRAPH_SELECTOR_H
8 
9 #include "optional"
10 #include "Perspective.h"
11 #include <boost/property_tree/ptree.hpp>
12 
13 namespace knowrob {
20  struct GraphSelector : public Printable {
21  GraphSelector() = default;
22 
26  AtomPtr graph;
34  bool occasional = false;
38  bool uncertain = false;
42  std::optional<double> begin;
46  std::optional<double> end;
50  std::optional<double> confidence;
51 
56  size_t hash() const;
57 
63  bool mergeWith(const GraphSelector &other);
64 
69  void set(const boost::property_tree::ptree &config);
70 
71  // Override Printable::write
72  void write(std::ostream &os) const override;
73  };
74 
75  // alias
76  using GraphSelectorPtr = std::shared_ptr<const GraphSelector>;
77 
82 }
83 
84 #endif //KNOWROB_GRAPH_SELECTOR_H
GraphSelectorPtr DefaultGraphSelector()
std::shared_ptr< Atom > AtomPtr
Definition: Atom.h:69
std::shared_ptr< const GraphSelector > GraphSelectorPtr
Definition: GraphSelector.h:76
std::shared_ptr< Perspective > PerspectivePtr
Definition: Perspective.h:68
std::optional< double > confidence
Definition: GraphSelector.h:50
std::optional< double > end
Definition: GraphSelector.h:46
void write(std::ostream &os) const override
void set(const boost::property_tree::ptree &config)
PerspectivePtr perspective
Definition: GraphSelector.h:30
size_t hash() const
std::optional< double > begin
Definition: GraphSelector.h:42
bool mergeWith(const GraphSelector &other)