Queue.hpp
Go to the documentation of this file.
1 // @formatter:off
2 //
3 // Balau core C++ library
4 //
5 // Copyright (C) 2008 Bora Software (contact@borasoftware.com)
6 //
7 // Licensed under the Boost Software License - Version 1.0 - August 17th, 2003.
8 // See the LICENSE file for the full license text.
9 //
10 
16 
17 #ifndef COM_BORA_SOFTWARE__BALAU_CONTAINER__QUEUE
18 #define COM_BORA_SOFTWARE__BALAU_CONTAINER__QUEUE
19 
20 namespace Balau::Container {
21 
27 template <typename T> class Queue {
31  public: virtual void enqueue(T && element) = 0;
32 
39  public: virtual T dequeue() = 0;
40 
44  public: virtual bool empty() const = 0;
45 };
46 
47 } // namespace Balau::Container
48 
49 #endif // COM_BORA_SOFTWARE__BALAU_CONTAINER__QUEUE
Base interface for queues.
Definition: Queue.hpp:27
virtual T dequeue()=0
Dequeue an object.
Various container classes, apart from interprocess containers.
Definition: ArrayBlockingQueue.hpp:25
virtual bool empty() const =0
Returns true if the queue is empty.
virtual void enqueue(T &&element)=0
Enqueue an object, moving the supplied element.