2 #ifndef _MADARA_CONTAINERS_QUEUE_H_ 3 #define _MADARA_CONTAINERS_QUEUE_H_ 7 #include "madara/LockType.h" 99 virtual ~
Queue () =
default;
105 void operator= (
const Queue & rhs);
155 template<
typename... Args>
156 bool emplace (Args&&... args);
212 void set_quality (uint32_t quality,
221 void resize (
int size = -1);
234 return (base + value) % queue_.size ();
288 #endif // _MADARA_CONTAINERS_QUEUE_H_ This class encapsulates an entry in a KnowledgeBase.
Integer tail_
Tail of the queue.
This class stores variables and their values for use by any entity needing state information in a thr...
Provides container classes for fast knowledge base access and mutation.
Integer count_
Count of elements in 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.
This class stores a vector of KaRL variables.
ThreadSafeContext * context_
Variable context that we are modifying.
Vector queue_
Underlying array of records.
This class provides a distributed knowledge base to users.
This class stores an integer within a variable context.
Integer head_
Head of the queue.
auto operator==(const Tracked< T > &lhs, const Tracked< U > &rhs) -> decltype(lhs.get()==rhs.get())
KnowledgeUpdateSettings settings_
Settings for modifications.
auto operator!=(const Tracked< T > &lhs, const Tracked< U > &rhs) -> decltype(lhs.get()!=rhs.get())
This class stores thread-safe queue within the knowledge base.
Provides functions and classes for the distributed knowledge base.
Settings for applying knowledge updates.
Copyright (c) 2015 Carnegie Mellon University.
Settings for applying knowledge updates.
MADARA_LOCK_TYPE mutex_
guard for access and changes
Provides an interface for external functions into the MADARA KaRL variable settings.