MADARA  3.1.8
EvalSettings.h
Go to the documentation of this file.
1 #ifndef _MADARA_EVAL_SETTINGS_
2 #define _MADARA_EVAL_SETTINGS_
3 
12 #include <string>
13 #include <map>
15 
16 namespace madara
17 {
18 
19  namespace knowledge
20  {
21 
27  {
28  /* Convenient pre-defined settings objects */
29 
31  static const EvalSettings DEFAULT;
32 
34  static const EvalSettings NO_EXPAND;
35 
37  static const EvalSettings DELAY;
38 
41 
48  {
49  }
50 
51 
77  explicit EvalSettings (bool t_delay_sending_modifieds,
78  bool t_treat_globals_as_locals = false,
79  bool t_signal_updates = true,
80  bool t_always_overwrite = false,
81  bool t_always_expand = true,
82  bool t_track_local_changes = false,
83  std::string t_pre_print_statement = "",
84  std::string t_post_print_statement = "",
85  uint64_t t_clock_increment = 1,
86  bool t_treat_locals_as_globals = false)
87  : KnowledgeUpdateSettings (t_treat_globals_as_locals,
88  t_signal_updates, t_always_overwrite,
89  t_always_expand, t_track_local_changes,
90  t_clock_increment, t_treat_locals_as_globals),
91  delay_sending_modifieds (t_delay_sending_modifieds),
92  pre_print_statement (t_pre_print_statement),
93  post_print_statement (t_post_print_statement)
94  {
95  }
96 
102  : KnowledgeUpdateSettings (rhs),
106  send_list (rhs.send_list)
107  {
108  }
109 
115 
120 
125 
130  std::map <std::string, bool> send_list;
131  };
132  }
133 }
134 #endif //_MADARA_EVAL_SETTINGS_
EvalSettings(bool t_delay_sending_modifieds, bool t_treat_globals_as_locals=false, bool t_signal_updates=true, bool t_always_overwrite=false, bool t_always_expand=true, bool t_track_local_changes=false, std::string t_pre_print_statement="", std::string t_post_print_statement="", uint64_t t_clock_increment=1, bool t_treat_locals_as_globals=false)
Constructor.
Definition: EvalSettings.h:77
std::map< std::string, bool > send_list
Map of record names that are allowed to be sent after operation.
Definition: EvalSettings.h:130
std::string pre_print_statement
Statement to print before evaluations.
Definition: EvalSettings.h:119
static const EvalSettings DELAY
Settings to delay sending modifieds, but do expand variables.
Definition: EvalSettings.h:37
std::string post_print_statement
Statement to print after evaluations.
Definition: EvalSettings.h:124
static constexpr struct madara::knowledge::tags::string_t string
Encapsulates settings for an evaluation statement.
Definition: EvalSettings.h:26
Provides functions and classes for the distributed knowledge base.
Settings for applying knowledge updates.
static const EvalSettings DELAY_NO_EXPAND
Settings to delay sending modifieds, and not expand variables.
Definition: EvalSettings.h:40
static const EvalSettings NO_EXPAND
Settings to immediately send modifieds, and not expand variables.
Definition: EvalSettings.h:34
Copyright (c) 2015 Carnegie Mellon University.
static const EvalSettings DEFAULT
Settings to immediately send modifieds, but do expand variables.
Definition: EvalSettings.h:31
bool delay_sending_modifieds
Toggle for sending modifieds in a single update event after each evaluation.
Definition: EvalSettings.h:114
EvalSettings(const EvalSettings &rhs)
Copy constructor.
Definition: EvalSettings.h:101