MADARA  3.2.3
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 
20  namespace knowledge
21  {
22 
28  {
33  {
36 
39  };
40 
46  use_source_clock (false)
47 
48  {
49  }
50 
51 
60  KnowledgeRequirements (bool t_clear_knowledge,
61  uint64_t t_clock_threshold = 0,
62  std::vector<MatchPredicate> t_predicates = {},
63  uint64_t t_quality_threshold = 0,
64  bool t_use_source_clock = false)
65  : clear_knowledge (t_clear_knowledge),
66  clock_threshold (t_clock_threshold),
67  predicates (t_predicates),
68  quality_threshold (t_quality_threshold),
69  use_source_clock (t_use_source_clock)
70  {
71  }
72 
80  predicates (rhs.predicates),
83  {
84  }
85 
90 
94  uint64_t clock_threshold;
95 
107  std::vector <MatchPredicate> predicates;
108 
113 
118  };
119  }
120 }
121 #endif //_MADARA_KNOWLEDGE_KNOWLEDGEREQUIREMENTS_H_
std::vector< MatchPredicate > predicates
A vector of acceptable predicates to match (prefix and suffix).
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.
uint64_t clock_threshold
Minimum acceptable clock to accept (0 by default)
bool use_source_clock
Update to the Lamport Clock of the source.
A helper class for matching prefixes and suffixes.
bool clear_knowledge
If true, during loads, clear the KnowledgeBase first.
static struct madara::knowledge::tags::string_t string
Holds settings requirements for knowledge, usually in copying.
Provides functions and classes for the distributed knowledge base.
Copyright (c) 2015 Carnegie Mellon University.
uint64_t quality_threshold
Minimum acceptable knowledge qualilty to accept (0 by default)
KnowledgeRequirements(const KnowledgeRequirements &rhs)
Copy constructor.