69 bool push(T && entry);
144 const typename std::vector<T>::const_iterator
next(
TailIdentifier key,
const typename std::vector<T>::const_iterator & it);
247 std::map<TailIdentifier, std::atomic<SizeType>>
m_tails;
A threadsafe queue with a single insertion and multiple extraction points.
Definition RingBuffer.h:22
SizeType size() const
Query current size.
Definition RingBuffer.inl:171
std::vector< T > m_buffer
Internal buffer.
Definition RingBuffer.h:244
TailIdentifier addTail()
Add a new tail to the buffer.
Definition RingBuffer.inl:101
bool valid(TailIdentifier key, const typename std::vector< T >::const_iterator &it) const
Check if iterator is valid.
Definition RingBuffer.inl:130
void removeTail(TailIdentifier key)
Remove a tail from the buffer.
Definition RingBuffer.inl:113
unsigned int SizeType
Numeric type employed for indices, sizes and distances.
Definition RingBuffer.h:26
SizeType lastTail() const
Determine last (furthest behind) index still in use.
Definition RingBuffer.inl:220
unsigned int TailIdentifier
Identifier type for tails.
Definition RingBuffer.h:27
void resize(SizeType newSize)
Resize buffer.
Definition RingBuffer.inl:23
bool push(T &&entry)
Add an element to the buffer, if possible.
Definition RingBuffer.inl:46
std::map< TailIdentifier, std::atomic< SizeType > > m_tails
Map (identifier->index) of tails.
Definition RingBuffer.h:247
bool isFull() const
Query if buffer is full.
Definition RingBuffer.inl:180
T nextHead(bool &available) const
Retrieve element beyond current head.
Definition RingBuffer.inl:30
bool isEmpty() const
Query if buffer is empty.
Definition RingBuffer.inl:189
const std::vector< T >::const_iterator next(TailIdentifier key, const typename std::vector< T >::const_iterator &it)
Advance the iterator of a tail.
Definition RingBuffer.inl:139
const std::vector< T >::const_iterator cbegin(TailIdentifier key) const
Retrieve the iterator for a tail.
Definition RingBuffer.inl:119
SizeType m_size
Size of buffer.
Definition RingBuffer.h:245
std::atomic< SizeType > m_head
Index of head (newest element)
Definition RingBuffer.h:246
SizeType maxSize() const
Query maximum size.
Definition RingBuffer.inl:165
Contains all the classes of glbinding.