24 #ifndef KDSME_UTIL_RINGBUFFER_H
25 #define KDSME_UTIL_RINGBUFFER_H
52 : m_capacity(capacity)
63 Q_ASSERT(capacity > 0);
64 m_capacity = capacity;
85 inline const T& at(
int i)
const {
return m_entries.at(i); }
86 inline int size()
const {
return m_entries.size(); }
91 inline T
head()
const {
return m_entries.head(); }
96 inline T
last()
const {
return m_entries.last(); }
97 inline QList<T> entries()
const {
return m_entries; }
102 while (m_entries.size() > m_capacity) {
T last() const
Definition: ringbuffer.h:96
T head() const
Definition: ringbuffer.h:91
RingBuffer(int capacity=10)
Definition: ringbuffer.h:51
void enqueue(T t)
Definition: ringbuffer.h:71
Definition: ringbuffer.h:45
void setCapacity(int capacity)
Definition: ringbuffer.h:61
Definition: abstractexporter.h:33
void clear()
Definition: ringbuffer.h:80