MADARA  3.4.1
KnowledgeRequirements.h
Go to the documentation of this file.
1 #ifndef _MADARA_KNOWLEDGE_KNOWLEDGEREQUIREMENTS_H_
2 #define _MADARA_KNOWLEDGE_KNOWLEDGEREQUIREMENTS_H_
3 
12 #include <string>
13 #include <map>
15 #include "madara/utility/Utility.h"
16 
17 namespace madara
18 {
19 namespace knowledge
20 {
26 {
31  {
34 
37  };
38 
43  : clear_knowledge(false),
44  clock_threshold(0),
46  use_source_clock(false)
47 
48  {
49  }
50 
59  KnowledgeRequirements(bool t_clear_knowledge, uint64_t t_clock_threshold = 0,
60  std::vector<MatchPredicate> t_predicates = {},
61  uint64_t t_quality_threshold = 0, bool t_use_source_clock = false)
62  : clear_knowledge(t_clear_knowledge),
63  clock_threshold(t_clock_threshold),
64  predicates(t_predicates),
65  quality_threshold(t_quality_threshold),
66  use_source_clock(t_use_source_clock)
67  {
68  }
69 
80  {
81  }
82 
87 
91  uint64_t clock_threshold;
92 
104  std::vector<MatchPredicate> predicates;
105 
110 
115 };
116 }
117 }
118 #endif //_MADARA_KNOWLEDGE_KNOWLEDGEREQUIREMENTS_H_
constexpr string_t string
Provides functions and classes for the distributed knowledge base.
Copyright(c) 2020 Galois.
A helper class for matching prefixes and suffixes.
Holds settings requirements for knowledge, usually in copying.
uint64_t clock_threshold
Minimum acceptable clock to accept (0 by default)
bool clear_knowledge
If true, during loads, clear the KnowledgeBase first.
KnowledgeRequirements(const KnowledgeRequirements &rhs)
Copy constructor.
KnowledgeRequirements(bool t_clear_knowledge, uint64_t t_clock_threshold=0, std::vector< MatchPredicate > t_predicates={}, uint64_t t_quality_threshold=0, bool t_use_source_clock=false)
Constructor.
std::vector< MatchPredicate > predicates
A vector of acceptable predicates to match (prefix and suffix).
bool use_source_clock
Update to the Lamport Clock of the source.
uint64_t quality_threshold
Minimum acceptable knowledge qualilty to accept (0 by default)