16 #ifndef BLOOMBERG_QUANTUM_FUTURE_ITERATOR_H 17 #define BLOOMBERG_QUANTUM_FUTURE_ITERATOR_H 21 #include <quantum/quantum_future_state.h> 22 #include <quantum/quantum_traits.h> 48 template <
class T,
class ALLOCATOR>
55 Buffer(
const ALLOCATOR& alloc = ALLOCATOR());
61 template <
class V = T>
85 std::deque<T,ALLOCATOR> _buffer;
91 #include <quantum/impl/quantum_buffer_impl.h> 93 #endif //BLOOMBERG_QUANTUM_FUTURE_ITERATOR_H Buffer is closed. Push operations are not allowed. Pull operations are allowed until buffer is emtpy.
Definition: quantum_buffer_impl.h:22
Buffer(const ALLOCATOR &alloc=ALLOCATOR())
Constructor.
Definition: quantum_buffer_impl.h:26
Data has been successfully read from the buffer.
size_t size() const
Indicates the number of values stored in the buffer.
Definition: quantum_buffer_impl.h:68
Data has been successfully written to the buffer.
void close()
Close the buffer. Once this method is called, push operations are no longer permitted....
Definition: quantum_buffer_impl.h:56
BufferStatus pull(T &value)
Pulls the next value from the buffer. This decreases the size of the buffer by one.
Definition: quantum_buffer_impl.h:44
BufferStatus push(V &&value)
Pushes a value at the end of the buffer. This increases the size of the buffer by one.
Definition: quantum_buffer_impl.h:33
Buffer is empty and more data is on the way.
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
bool isClosed() const
Indicates if the buffer is closed.
Definition: quantum_buffer_impl.h:62
T ValueType
Type definition for the contained value.
Definition: quantum_buffer.h:52