Public Member Functions | List of all members
Queue< T > Class Template Referenceabstract

Base interface for queues. More...

#include <Queue.hpp>

Inheritance diagram for Queue< T >:
[legend]

Public Member Functions

virtual T dequeue ()=0
 Dequeue an object. More...
 
virtual bool empty () const =0
 Returns true if the queue is empty. More...
 
virtual void enqueue (T &&element)=0
 Enqueue an object, moving the supplied element. More...
 

Detailed Description

template<typename T>
class Balau::Container::Queue< T >

Base interface for queues.

Template Parameters
Tthe element type (must be move constructable and assignable)

Member Function Documentation

◆ dequeue()

virtual T dequeue ( )
pure virtual

Dequeue an object.

Depending on the implementation, this operation will either block or throw EmptyException when no elements are available for dequeueing.

Implemented in SharedMemoryQueue< T >, ArrayBlockingQueue< T >, SynchronizedQueue< T >, and BlockingQueue< T >.

◆ empty()

virtual bool empty ( ) const
pure virtual

Returns true if the queue is empty.

Implemented in SharedMemoryQueue< T >, ArrayBlockingQueue< T >, BlockingQueue< T >, and SynchronizedQueue< T >.

◆ enqueue()

virtual void enqueue ( T &&  element)
pure virtual

Enqueue an object, moving the supplied element.

Implemented in SharedMemoryQueue< T >, ArrayBlockingQueue< T >, SynchronizedQueue< T >, and BlockingQueue< T >.


The documentation for this class was generated from the following file: