25 template <
class T,
class ALLOCATOR>
31 template <
class T,
class ALLOCATOR>
37 return BufferStatus::Closed;
39 _buffer.push_back(std::forward<V>(value));
40 return BufferStatus::DataPosted;
43 template <
class T,
class ALLOCATOR>
48 return _isClosed ? BufferStatus::Closed : BufferStatus::DataPending;
50 value = std::move(_buffer.front());
52 return BufferStatus::DataReceived;
55 template <
class T,
class ALLOCATOR>
61 template <
class T,
class ALLOCATOR>
67 template <
class T,
class ALLOCATOR>
70 return _buffer.
size();
73 template <
class T,
class ALLOCATOR>
76 return _buffer.
empty();
Definition: quantum_buffer_impl.h:22
Buffer(const ALLOCATOR &alloc=ALLOCATOR())
Constructor.
Definition: quantum_buffer_impl.h:26
size_t size() const
Indicates the number of values stored in the buffer.
Definition: quantum_buffer_impl.h:68
Container which allows buffered access to a series of values. Values are pushed-in (written) by a pro...
Definition: quantum_buffer.h:49
bool empty() const
Helper function equivalent to size() == 0;.
Definition: quantum_buffer_impl.h:74
BufferStatus
Defines the result of the operation on the buffer object.
Definition: quantum_buffer.h:32