2 #ifndef _MADARA_CONTAINERS_QUEUE_H_
3 #define _MADARA_CONTAINERS_QUEUE_H_
7 #include "madara/LockType.h"
94 void operator=(
const Queue& rhs);
142 template<
typename... Args>
143 bool emplace(Args&&... args);
198 void set_quality(uint32_t quality,
207 void resize(
int size = -1);
220 return (base + value) % queue_.size();
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 stores an integer within a variable context.
This class stores thread-safe queue within the knowledge base.
ThreadSafeContext * context_
Variable context that we are modifying.
Integer count_
Count of elements in queue.
virtual ~Queue()=default
Destructor.
Integer tail_
Tail of the queue.
knowledge::KnowledgeRecord::Integer increment(knowledge::KnowledgeRecord::Integer base, knowledge::KnowledgeRecord::Integer value)
Increments the base by the value, using size as a boundary.
std::string name_
Prefix of variable.
MADARA_LOCK_TYPE mutex_
guard for access and changes
KnowledgeUpdateSettings settings_
Settings for modifications.
Integer head_
Head of the queue.
Vector queue_
Underlying array of records.
This class stores a vector of KaRL variables.
Provides container classes for fast knowledge base access and mutation.
Provides functions and classes for the distributed knowledge base.
auto operator==(const KnowledgeRecord &l, const T &r) -> decltype(knowledge_cast< T >(l)==r)
auto operator!=(const KnowledgeRecord &l, const T &r) -> decltype(knowledge_cast< T >(l) !=r)
Copyright(c) 2020 Galois.