MADARA  3.1.8
KnowledgeUpdateSettings.h
Go to the documentation of this file.
1 #ifndef _MADARA_KNOWLEDGE_UPDATE_SETTINGS_H_
2 #define _MADARA_KNOWLEDGE_UPDATE_SETTINGS_H_
3 
12 #include "madara/MADARA_export.h"
13 #include "madara/utility/stdint.h"
15 
16 namespace madara
17 {
18  namespace knowledge
19  {
23  class MADARA_Export KnowledgeUpdateSettings
25  {
26  public:
27  /* Convenient pre-defined settings objects */
32 
38  treat_globals_as_locals (false),
39  signal_changes (true),
40  always_overwrite (false),
41  track_local_changes (true),
42  clock_increment (1),
43  treat_locals_as_globals (false)
44  {
45  }
46 
67  KnowledgeUpdateSettings (bool t_treat_globals_as_locals,
68  bool t_signal_changes = true,
69  bool t_always_overwrite = false,
70  bool t_always_expand = true,
71  bool t_track_local_changes = true,
72  uint64_t t_clock_increment = 1,
73  bool t_treat_locals_as_globals = false)
74  : KnowledgeReferenceSettings (t_always_expand),
75  treat_globals_as_locals (t_treat_globals_as_locals),
76  signal_changes (t_signal_changes),
77  always_overwrite (t_always_overwrite),
78  track_local_changes (t_track_local_changes),
79  clock_increment (t_clock_increment),
80  treat_locals_as_globals (t_treat_locals_as_globals)
81  {
82  }
83 
89  treat_globals_as_locals (rhs.treat_globals_as_locals),
90  signal_changes (rhs.signal_changes),
91  always_overwrite (rhs.always_overwrite),
92  track_local_changes (rhs.track_local_changes),
93  clock_increment (rhs.clock_increment),
94  treat_locals_as_globals (rhs.treat_locals_as_globals)
95  {
96  }
97 
98 
103  {
104  }
105 
111 
119 
125 
132 
136  uint64_t clock_increment;
137 
149 
150  };
151  }
152 }
153 
154 #endif // _MADARA_KNOWLEDGE_UPDATE_SETTINGS_H_
KnowledgeUpdateSettings(const KnowledgeUpdateSettings &rhs)
Constructor.
bool signal_changes
Toggle whether to signal changes have happened.
KnowledgeUpdateSettings(bool t_treat_globals_as_locals, bool t_signal_changes=true, bool t_always_overwrite=false, bool t_always_expand=true, bool t_track_local_changes=true, uint64_t t_clock_increment=1, bool t_treat_locals_as_globals=false)
Constructor.
static const KnowledgeUpdateSettings GLOBAL_AS_LOCAL
uint64_t clock_increment
Default clock increment.
static const KnowledgeUpdateSettings DEFAULT
static const KnowledgeUpdateSettings GLOBAL_AS_LOCAL_NO_EXPAND
bool always_overwrite
Toggle for always overwriting records, regardless of quality, clock values, etc.
Provides functions and classes for the distributed knowledge base.
Settings for applying knowledge updates.
bool treat_globals_as_locals
Toggle whether updates to global variables are treated as local variables and not marked as modified ...
Copyright (c) 2015 Carnegie Mellon University.
bool track_local_changes
Toggle for checkpointing support.
static const KnowledgeUpdateSettings NO_EXPAND
Settings for applying knowledge updates.
bool treat_locals_as_globals
Toggle whether updates to local variables are treated as global variables that should be sent over th...