2 #ifndef _MADARA_CONTAINERS_MAP_H_
3 #define _MADARA_CONTAINERS_MAP_H_
8 #include "madara/LockType.h"
92 void operator=(
const Map& rhs);
102 void exchange(
Map& other,
bool refresh_keys =
true,
bool delete_keys =
true);
126 size_t size(
void)
const;
133 std::vector<std::string> sync_keys(
void);
139 void keys(std::vector<std::string>& curkeys)
const;
182 void set_delimiter(
const std::string& delimiter,
bool sync =
true);
198 void clear(
bool clear_knowledge =
true);
274 int set_index(
const std::string& key,
size_t index,
287 int set_index(
const std::string& key,
size_t index,
326 const std::vector<KnowledgeRecord::Integer>& value);
338 const std::vector<KnowledgeRecord::Integer>& value,
372 int set_index(
const std::string& key,
size_t index,
double value);
384 int set_index(
const std::string& key,
size_t index,
double value,
396 int set(
const std::string& key,
const double* value, uint32_t size);
408 int set(
const std::string& key,
const double* value, uint32_t size,
419 int set(
const std::string& key,
const std::vector<double>& value);
430 int set(
const std::string& key,
const std::vector<double>& value,
462 int set_file(
const std::string& key,
const unsigned char* value,
size_t size);
472 int set_file(
const std::string& key,
const unsigned char* value,
size_t size,
482 int set_jpeg(
const std::string& key,
const unsigned char* value,
size_t size);
492 int set_jpeg(
const std::string& key,
const unsigned char* value,
size_t size,
502 void set_quality(
const std::string& key, uint32_t quality,
528 bool is_true(
void)
const;
534 bool is_false(
void)
const;
541 virtual bool is_true_(
void)
const;
547 virtual bool is_false_(
void)
const;
557 virtual void modify_(
void);
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...
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 map of strings to KaRL variables.
ThreadSafeContext * context_
Variable context that we are modifying.
std::map< std::string, VariableReference > InternalMap
internal map of variable references
std::string delimiter_
Delimiter for the prefix to subvars.
InternalMap map_
Map of variables to values.
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.