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);
188 void to_container (
Double & target)
const;
194 void to_container (
Integer & target)
const;
200 void to_container (
String & target)
const;
206 void to_container (
Map & target)
const;
223 double to_double (
double default_value = 0.0)
const;
239 size_t size (
bool first_level_keys_only =
true)
const;
248 void keys (std::vector <std::string> & curkeys,
249 bool first_level_keys_only =
true)
const;
263 const std::string & key,
bool first_level_key =
false)
const;
294 void set_delimiter (
const std::string & delimiter);
315 void erase (
const std::string & key,
bool delete_subkeys =
true);
321 bool is_true (
void)
const;
327 bool is_false (
void)
const;
367 void operator= (
int value);
392 void operator= (
const std::vector <KnowledgeRecord::Integer> & value);
401 void operator= (
const std::vector <double> & value);
422 int set_index (
size_t index,
434 int set_index (
size_t index,
469 int set (
const std::vector <KnowledgeRecord::Integer> & value);
479 int set (
const std::vector <KnowledgeRecord::Integer> & value,
489 int set (
double value);
499 int set (
double value,
510 int set_index (
size_t index,
double value);
521 int set_index (
size_t index,
double value,
532 int set (
const double * value,
544 int set (
const double * value,
555 int set (
const std::vector <double> & value);
565 int set (
const std::vector <double> & value,
594 int set_file (
const unsigned char * value,
size_t size);
603 int set_file (
const unsigned char * value,
size_t size,
612 int set_jpeg (
const unsigned char * value,
size_t size);
621 int set_jpeg (
const unsigned char * value,
size_t size,
630 void set_quality (uint32_t quality,
658 virtual bool is_true_ (
void)
const;
664 virtual bool is_false_ (
void)
const;
674 virtual void modify_ (
void);
688 void update_variable (
void)
const;
712 #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::knowledge::KnowledgeRecord KnowledgeRecord
int read_file(const std::string &filename, void *&buffer, size_t &size, bool add_zero_char)
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.