2 #ifndef _MADARA_KNOWLEDGE_CONTAINERS_VECTOR_INL_
3 #define _MADARA_KNOWLEDGE_CONTAINERS_VECTOR_INL_
25 MADARA_GUARD_TYPE guard(
mutex_);
37 MADARA_GUARD_TYPE guard(
mutex_);
57 MADARA_GUARD_TYPE guard(
mutex_);
74 MADARA_GUARD_TYPE guard(
mutex_);
89 MADARA_GUARD_TYPE guard(
mutex_);
109 MADARA_GUARD_TYPE guard(
mutex_);
A thread-safe guard for a context or knowledge base.
This class provides a distributed knowledge base to users.
This class encapsulates an entry in a KnowledgeBase.
Settings for applying knowledge updates.
This class stores variables and their values for use by any entity needing state information in a thr...
void mark_modified(const VariableReference &variable, const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings())
Marks the variable reference as updated for the purposes of sending or checkpointing knowledge (for g...
int set(const std::string &key, T &&value, const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings())
Atomically sets the value of a variable to the specific record.
Provides an interface for external functions into the MADARA KaRL variable settings.
KnowledgeUpdateSettings settings_
Settings for modifications.
std::string name_
Prefix of variable.
MADARA_LOCK_TYPE mutex_
guard for access and changes
VariableReference size_
Reference to the size field of the vector space.
VariableReference get_size_ref(void)
Returns a reference to the size field of the current name.
std::string get_delimiter(void)
Gets the delimiter for adding and detecting subvariables.
std::vector< VariableReference > vector_
Values of the array.
std::string delimiter_
Delimiter for the prefix to subvars.
void set_name(const std::string &var_name, KnowledgeBase &knowledge, int size=-1)
Sets the variable name that this refers to.
void set_delimiter(const std::string &delimiter)
Sets the delimiter for adding and detecting subvariables.
ThreadSafeContext * context_
Variable context that we are modifying.
void resize(int size=-1, bool delete_vars=true)
Resizes the vector.
void modify_size(void)
Mark the size as modified to resent that information.
int set(size_t index, madara::knowledge::KnowledgeRecord::Integer value=madara::knowledge::KnowledgeRecord::MODIFIED)
Sets a knowledge variable to a specified value.
size_t size(void) const
Returns the size of the local vector.
Provides container classes for fast knowledge base access and mutation.
Provides functions and classes for the distributed knowledge base.
Copyright(c) 2020 Galois.