Support Class Library
A set of tools providing classes and utility
|
#include "AsyncQueue.h"
Public Types | |
using | queue_type = std::queue< T, Container > |
using | size_type = typename queue_type::size_type |
using | value_type = typename queue_type::value_type |
using | guarded_type = Mutexed< queue_type, Lock, Guard > |
using | optional_type = scl::utils::Optional< value_type > |
Public Member Functions | |
AsyncQueue () | |
AsyncQueue (AsyncQueue &&) noexcept=default | |
AsyncQueue & | operator= (AsyncQueue &&) noexcept=default |
AsyncQueue (const AsyncQueue &)=delete | |
AsyncQueue & | operator= (const AsyncQueue &)=delete |
AsyncQueue (std::initializer_list< value_type > list) | |
size_type | size () const |
Determine the size of the queue. More... | |
size_type | length () const |
Alias for AsyncQueue::size. More... | |
bool | isEmpty () const |
Determine whether or not the queue is empty. More... | |
optional_type | front () const |
Retrieve the front element of the queue. More... | |
optional_type | back () const |
Retrieve the back element of the queue. More... | |
optional_type | first () const |
Alias for AsyncQueue::front. More... | |
optional_type | head () const |
optional_type | last () const |
Alias for AsyncQueue::back. More... | |
optional_type | tail () const |
AsyncQueue & | push (const value_type &elem) |
Add an element to the queue by copy. More... | |
AsyncQueue & | push (value_type &&elem) |
Add an element to the queue by move. More... | |
template<class... Args> | |
AsyncQueue & | pushEmplace (Args &&... args) |
Construct and add an element to the queue. More... | |
optional_type | pop () |
Removes the first element of the queue. More... | |
AsyncQueue & | queue (const value_type &elem) |
Alias for AsyncQueue::push. More... | |
AsyncQueue & | enqueue (const value_type &elem) |
AsyncQueue & | queue (value_type &&elem) |
AsyncQueue & | enqueue (value_type &&elem) |
optional_type | dequeue () |
Alias for AsyncQueue::pop. More... | |
Protected Attributes | |
guarded_type | queue_ |
Definition at line 11 of file AsyncQueue.h.
using scl::async::AsyncQueue< T, Lock, Guard, Container >::guarded_type = Mutexed<queue_type, Lock, Guard> |
Definition at line 17 of file AsyncQueue.h.
using scl::async::AsyncQueue< T, Lock, Guard, Container >::optional_type = scl::utils::Optional<value_type> |
Definition at line 18 of file AsyncQueue.h.
using scl::async::AsyncQueue< T, Lock, Guard, Container >::queue_type = std::queue<T, Container> |
Definition at line 13 of file AsyncQueue.h.
using scl::async::AsyncQueue< T, Lock, Guard, Container >::size_type = typename queue_type::size_type |
Definition at line 14 of file AsyncQueue.h.
using scl::async::AsyncQueue< T, Lock, Guard, Container >::value_type = typename queue_type::value_type |
Definition at line 15 of file AsyncQueue.h.
|
inline |
Definition at line 24 of file AsyncQueue.h.
|
defaultnoexcept |
|
delete |
|
inline |
Definition at line 32 of file AsyncQueue.h.
|
inline |
Retrieve the back element of the queue.
Definition at line 79 of file AsyncQueue.h.
|
inline |
Alias for AsyncQueue::pop.
Definition at line 159 of file AsyncQueue.h.
|
inline |
Definition at line 152 of file AsyncQueue.h.
|
inline |
Definition at line 154 of file AsyncQueue.h.
|
inline |
Alias for AsyncQueue::front.
Definition at line 88 of file AsyncQueue.h.
|
inline |
Retrieve the front element of the queue.
Definition at line 69 of file AsyncQueue.h.
|
inline |
Definition at line 89 of file AsyncQueue.h.
|
inline |
Determine whether or not the queue is empty.
Definition at line 61 of file AsyncQueue.h.
|
inline |
Alias for AsyncQueue::back.
Definition at line 94 of file AsyncQueue.h.
|
inline |
Alias for AsyncQueue::size.
Definition at line 53 of file AsyncQueue.h.
|
defaultnoexcept |
|
delete |
|
inline |
Removes the first element of the queue.
Definition at line 139 of file AsyncQueue.h.
|
inline |
Add an element to the queue by copy.
elem | being the element to copy into the queue |
Definition at line 102 of file AsyncQueue.h.
|
inline |
Add an element to the queue by move.
elem | being the element to move into the queue |
Definition at line 114 of file AsyncQueue.h.
|
inline |
Construct and add an element to the queue.
Args | being the types of the arguments for the constructor |
args | being the arguments for the constructor |
Definition at line 128 of file AsyncQueue.h.
|
inline |
Alias for AsyncQueue::push.
Definition at line 151 of file AsyncQueue.h.
|
inline |
Definition at line 153 of file AsyncQueue.h.
|
inline |
Determine the size of the queue.
Definition at line 44 of file AsyncQueue.h.
|
inline |
Definition at line 95 of file AsyncQueue.h.
|
protected |
Definition at line 21 of file AsyncQueue.h.