2 #ifndef _MADARA_CONTAINERS_FLEX_MAP_H_ 3 #define _MADARA_CONTAINERS_FLEX_MAP_H_ 8 #include "madara/LockType.h" 111 void operator= (
const FlexMap & rhs);
121 void exchange (
FlexMap & other,
122 bool refresh_keys =
true,
bool delete_keys =
true);
136 FlexMap operator[] (
size_t index);
185 void to_container (
Double & target)
const;
191 void to_container (
Integer & target)
const;
197 void to_container (
String & target)
const;
203 void to_container (
Map & target)
const;
215 double to_double (
void)
const;
229 size_t size (
bool first_level_keys_only =
true)
const;
238 void keys (std::vector <std::string> & curkeys,
239 bool first_level_keys_only =
true)
const;
253 const std::string & key,
bool first_level_key =
false)
const;
284 void set_delimiter (
const std::string & delimiter);
305 void erase (
const std::string & key,
bool delete_subkeys =
true);
311 bool is_true (
void)
const;
317 bool is_false (
void)
const;
357 void operator= (
int value);
382 void operator= (
const std::vector <KnowledgeRecord::Integer> & value);
391 void operator= (
const std::vector <double> & value);
412 int set_index (
size_t index,
424 int set_index (
size_t index,
459 int set (
const std::vector <KnowledgeRecord::Integer> & value);
469 int set (
const std::vector <KnowledgeRecord::Integer> & value,
479 int set (
double value);
489 int set (
double value,
500 int set_index (
size_t index,
double value);
511 int set_index (
size_t index,
double value,
522 int set (
const double * value,
534 int set (
const double * value,
545 int set (
const std::vector <double> & value);
555 int set (
const std::vector <double> & value,
584 int set_file (
const unsigned char * value,
size_t size);
593 int set_file (
const unsigned char * value,
size_t size,
602 int set_jpeg (
const unsigned char * value,
size_t size);
611 int set_jpeg (
const unsigned char * value,
size_t size,
620 void set_quality (uint32_t quality,
648 virtual bool is_true_ (
void)
const;
654 virtual bool is_false_ (
void)
const;
664 virtual void modify_ (
void);
678 void update_variable (
void)
const;
702 #endif // _MADARA_CONTAINERS_FLEX_MAP_H_ This class encapsulates an entry in a KnowledgeBase.
This class stores a double within a variable context.
This class stores a vector of character buffers.
This class stores a vector of doubles inside of KaRL.
MADARA_Export int read_file(const std::string &filename, void *&buffer, size_t &size, bool add_zero_char=false)
Reads a file into a provided void pointer.
This class stores a string within a variable context.
This class stores variables and their values for use by any entity needing state information in a thr...
This class stores a vector of integers inside of KaRL.
ThreadSafeContext * context_
Variable context that we are modifying.
Optimized reference to a variable within the knowledge base.
Provides container classes for fast knowledge base access and mutation.
This class stores a vector of strings inside of KaRL.
This class stores a map of strings to KaRL variables.
This class provides a distributed knowledge base to users.
This class stores an integer within a variable context.
This class stores a vector of doubles inside of KaRL.
std::string delimiter_
Delimiter for the prefix to subvars.
MADARA_Export bool exists(const char *originator, uint64_t clock, uint32_t update_number, OriginatorFragmentMap &map)
Checks if a fragment already exists within a fragment map.
Provides functions and classes for the distributed knowledge base.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
VariableReference variable_
The current location variable.
Settings for applying knowledge updates.
This class stores a vector of doubles inside of KaRL.
std::map< std::string, VariableReference > InternalFlexMap
internal map of variable references
Provides an interface for external functions into the MADARA KaRL variable settings.
This class stores a flexible map of strings and ints to KaRL variables FlexMap differs from Map in th...
This class is an abstract base class for all containers.