6 :
BaseContainer (
"", settings), context_ (0), value_ (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.
VariableReference get_ref(const std::string &key, const KnowledgeReferenceSettings &settings=knowledge::KnowledgeReferenceSettings(false))
Retrieves the value of a variable.
virtual void modify_(void)
Polymorphic modify method used by collection containers.
double to_double(void) const
converts the value to a float/double
DoubleStaged(const KnowledgeUpdateSettings &settings=KnowledgeUpdateSettings())
Default constructor.
bool has_changed_
Tracks if value_ has changed since last read.
MADARA_LOCK_TYPE mutex_
guard for access and changes
void write(void)
Writes the value to the knowledge base.
void exchange(DoubleStaged &other)
Exchanges the integer at this location with the integer at another location.
std::string get_debug_info(void)
Returns the type of the container along with name and any other useful information.
madara::knowledge::KnowledgeRecord get(const std::string &key, const KnowledgeReferenceSettings &settings=KnowledgeReferenceSettings(false))
Retrieves a knowledge 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...
bool is_true(void) const
Determines if the value is true.
bool is_false(void) const
Determines if the value is zero.
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 ...
ThreadSafeContext * context_
Variable context that we are modifying.
A thread-safe guard for a context or knowledge base.
This class provides a distributed knowledge base to users.
Stages an integer value to and from the knowledge base.
virtual std::string get_debug_info_(void)
Returns the type of the container along with name and any other useful information.
VariableReference variable_
Variable reference.
virtual ~DoubleStaged()
Destructor.
void modify(void)
Mark the value as modified.
type value_
The staged value.
Provides functions and classes for the distributed knowledge base.
KnowledgeUpdateSettings settings_
Settings for modifications.
Settings for applying knowledge updates.
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.
VariableReference get_ref(const std::string &key, const KnowledgeReferenceSettings &settings=KnowledgeReferenceSettings(false))
Atomically returns a reference to the variable.
double type
trait that describes the value type