6 :
BaseContainer (
"", settings), context_ (0), has_changed_ (false)
int set(const std::string &key, T &&value, const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings())
Atomically sets the value of a variable to the specific record.
virtual std::string get_debug_info_(void)
Returns the type of the container along with name and any other useful information.
VariableReference get_ref(const std::string &key, const KnowledgeReferenceSettings &settings=knowledge::KnowledgeReferenceSettings(false))
Retrieves the value of a variable.
bool is_false(void) const
Determines if the value is zero.
type value_
The staged value.
virtual bool is_true_(void) const
Polymorphic is true method which can be used to determine if all values in the container are true...
void modify(void)
Mark the value as modified.
bool has_changed_
Tracks if value_ has changed since last read.
MADARA_LOCK_TYPE mutex_
guard for access and changes
bool is_true(void) const
Determines if the value is true.
virtual ~StringStaged()
Destructor.
madara::knowledge::KnowledgeRecord get(const std::string &key, const KnowledgeReferenceSettings &settings=KnowledgeReferenceSettings(false))
Retrieves a knowledge value.
void write(void)
Writes the value to the knowledge base.
virtual bool is_false_(void) const
Polymorphic is false method which can be used to determine if at least one value in the container is ...
virtual void modify_(void)
Polymorphic modify method used by collection containers.
A thread-safe guard for a context or knowledge base.
This class provides a distributed knowledge base to users.
std::string get_debug_info(void)
Returns the type of the container along with name and any other useful information.
std::string type
trait that describes the value type
VariableReference variable_
Variable reference.
Provides functions and classes for the distributed knowledge base.
KnowledgeUpdateSettings settings_
Settings for modifications.
Settings for applying knowledge updates.
void exchange(StringStaged &other)
Exchanges the integer at this location with the integer at another location.
std::string to_string(const std::string &delimiter=", ") const
converts the value to a string.
knowledge::KnowledgeRecord get(const std::string &key, const KnowledgeReferenceSettings &settings=knowledge::KnowledgeReferenceSettings(false))
Retrieves the value of a variable.
Provides an interface for external functions into the MADARA KaRL variable settings.
This class is an abstract base class for all containers.
ThreadSafeContext * context_
Variable context that we are modifying.
StringStaged(const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings())
Default constructor.
VariableReference get_ref(const std::string &key, const KnowledgeReferenceSettings &settings=KnowledgeReferenceSettings(false))
Atomically returns a reference to the variable.
Stages a string value to and from the knowledge base.