1 #ifndef _MADARA_VARIABLE_REFERENCE_INL_ 2 #define _MADARA_VARIABLE_REFERENCE_INL_ 26 return !(*
this == rhs);
35 return entry_->first.c_str();
65 for (
const auto &pair : records)
71 max = std::max <uint32_t> (rec->
quality, max);
78 #endif // _MADARA_VARIABLE_REFERENCE_INL_ This class encapsulates an entry in a KnowledgeBase.
uint32_t max_quality(const KnowledgeRecords &records)
Returns the maximum quality within the records.
bool operator!=(const VariableReference &rhs) const
Inequality operator.
uint32_t quality
priority of the update
KnowledgeRecord * get_record_unsafe(void) const
Returns a pointer to the variable's KnowledgeRecord Do not use this pointer unless you've locked the ...
Optimized reference to a variable within the knowledge base.
bool is_valid(void) const
Checks to see if the variable reference has been initialized.
VariableReference()=default
Default constructor.
std::map< const char *, VariableReference, VariableReferenceMapCompare > VariableReferenceMap
a map of variable references
KnowledgeMap::value_type * pair_ptr
bool operator==(const VariableReference &rhs) const
Equality operator.
const char * get_name(void) const
Returns the name of the variable.
Provides functions and classes for the distributed knowledge base.
void assign(pair_ptr entry)
Refer to a different variable.
Copyright (c) 2015 Carnegie Mellon University.