2 #ifndef _MADARA_CONTAINERS_FLEX_MAP_H_
3 #define _MADARA_CONTAINERS_FLEX_MAP_H_
8 #include "madara/LockType.h"
106 void operator=(
const FlexMap& rhs);
117 FlexMap& other,
bool refresh_keys =
true,
bool delete_keys =
true);
131 FlexMap operator[](
size_t index);
183 void to_container(
Double& target)
const;
189 void to_container(
Integer& target)
const;
195 void to_container(
String& target)
const;
201 void to_container(
Map& target)
const;
218 double to_double(
double default_value = 0.0)
const;
234 size_t size(
bool first_level_keys_only =
true)
const;
243 void keys(std::vector<std::string>& curkeys,
244 bool first_level_keys_only =
true)
const;
307 void erase(
const std::string& key,
bool delete_subkeys =
true);
313 bool is_true(
void)
const;
319 bool is_false(
void)
const;
357 void operator=(
int value);
364 void operator=(
double value);
380 void operator=(
const std::vector<KnowledgeRecord::Integer>& value);
389 void operator=(
const std::vector<double>& value);
453 int set(
const std::vector<KnowledgeRecord::Integer>& value);
463 int set(
const std::vector<KnowledgeRecord::Integer>& value,
473 int set(
double value);
493 int set_index(
size_t index,
double value);
515 int set(
const double* value, uint32_t size);
526 int set(
const double* value, uint32_t size,
536 int set(
const std::vector<double>& value);
546 int set(
const std::vector<double>& value,
574 int set_file(
const unsigned char* value,
size_t size);
583 int set_file(
const unsigned char* value,
size_t size,
592 int set_jpeg(
const unsigned char* value,
size_t size);
601 int set_jpeg(
const unsigned char* value,
size_t size,
610 void set_quality(uint32_t quality,
637 virtual bool is_true_(
void)
const;
643 virtual bool is_false_(
void)
const;
653 virtual void modify_(
void);
667 void update_variable(
void)
const;
madara::knowledge::KnowledgeRecord KnowledgeRecord
This class provides a distributed knowledge base to users.
This class encapsulates an entry in a KnowledgeBase.
Settings for applying knowledge updates.
Settings for applying knowledge updates.
This class stores variables and their values for use by any entity needing state information in a thr...
Optimized reference to a variable within the knowledge base.
Provides an interface for external functions into the MADARA KaRL variable settings.
This class is an abstract base class for all containers.
This class stores a vector of character buffers.
This class stores a vector of doubles inside of KaRL.
This class stores a double within a variable context.
This class stores a flexible map of strings and ints to KaRL variables FlexMap differs from Map in th...
std::string delimiter_
Delimiter for the prefix to subvars.
VariableReference variable_
The current location variable.
ThreadSafeContext * context_
Variable context that we are modifying.
std::map< std::string, VariableReference > InternalFlexMap
internal map of variable references
This class stores a vector of integers inside of KaRL.
This class stores an integer within a variable context.
This class stores a map of strings to KaRL variables.
This class stores a vector of doubles inside of KaRL.
This class stores a vector of doubles inside of KaRL.
This class stores a vector of strings inside of KaRL.
This class stores a string within a variable context.
Provides container classes for fast knowledge base access and mutation.
Provides functions and classes for the distributed knowledge base.
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.
int read_file(const std::string &filename, void *&buffer, size_t &size, bool add_zero_char)
Reads a file into a provided void pointer.
Copyright(c) 2020 Galois.