C/C++ API Reference
Loading...
Searching...
No Matches
pw::BasicInlineAsyncDeque< ValueType, SizeType, kCapacity > Class Template Reference

Overview

template<typename ValueType, typename SizeType, size_t kCapacity = containers::internal::kGenericSized>
class pw::BasicInlineAsyncDeque< ValueType, SizeType, kCapacity >

BasicInlineAsyncDeque adds async PendHasSpace and PendNotEmpty methods to BasicInlineDeque.

BasicInlineAsyncDeque allows specifying the size_type. Larger size_types allow for larger queues, but they slightly increase the object's size. Users should typically reach for pw::InlineAsyncDeque, which uses a size_type of uint16_t.

Warning
BasicInlineAsyncDeque is NOT thread safe. External synchronization is required to share a BasicInlineAsyncDeque between threads.
Inheritance diagram for pw::BasicInlineAsyncDeque< ValueType, SizeType, kCapacity >:

Public Member Functions

constexpr BasicInlineAsyncDeque () noexcept=default
 Constructs with zero elements.
 
 BasicInlineAsyncDeque (size_type count, const_reference value)
 Constructs with count copies of value.
 
 BasicInlineAsyncDeque (size_type count)
 Constructs with count default-initialized elements.
 
template<typename InputIterator , typename = containers::internal::EnableIfInputIterator<InputIterator>>
 BasicInlineAsyncDeque (InputIterator start, InputIterator finish)
 Copy constructs from an iterator.
 
 BasicInlineAsyncDeque (const BasicInlineAsyncDeque &other)
 Copy constructs for matching capacity.
 
template<size_t kOtherCapacity>
 BasicInlineAsyncDeque (const BasicInlineAsyncDeque< ValueType, SizeType, kOtherCapacity > &other)
 
 BasicInlineAsyncDeque (BasicInlineAsyncDeque &&other) noexcept
 Move constructs for matching capacity.
 
template<size_t kOtherCapacity>
 BasicInlineAsyncDeque (BasicInlineAsyncDeque< ValueType, SizeType, kOtherCapacity > &&other) noexcept
 Move constructs for mismatched capacity.
 
 BasicInlineAsyncDeque (const std::initializer_list< value_type > &list)
 Copy constructs from an initializer list.
 
template<typename T , typename = containers::internal::EnableIfIterable<T>>
 BasicInlineAsyncDeque (const T &other)
 Copy constructor for arbitrary iterables.
 
BasicInlineAsyncDequeoperator= (const std::initializer_list< value_type > &list)
 Copy assigns from list.
 
BasicInlineAsyncDequeoperator= (const BasicInlineAsyncDeque &other)
 Copy assigns for matching capacity.
 
template<size_t kOtherCapacity>
BasicInlineAsyncDequeoperator= (const BasicInlineAsyncDeque< ValueType, SizeType, kOtherCapacity > &other)
 
BasicInlineAsyncDequeoperator= (BasicInlineAsyncDeque &&other) noexcept
 Move assigns for matching capacity.
 
template<size_t kOtherCapacity>
BasicInlineAsyncDequeoperator= (BasicInlineAsyncDeque< ValueType, SizeType, kOtherCapacity > &&other) noexcept
 Move assigns for mismatched capacity.
 
async2::Poll PendHasSpace (async2::Context &context, size_type num=1)
 Returns pw::async2::Pending until space for num elements is available.
 
async2::Poll PendNotEmpty (async2::Context &context)
 Returns pw::async2::Pending until an element is available.
 

Static Public Member Functions

static constexpr size_type max_size ()
 
static constexpr size_type capacity ()
 

Constructor & Destructor Documentation

◆ BasicInlineAsyncDeque()

template<typename ValueType , typename SizeType , size_t kCapacity = containers::internal::kGenericSized>
template<size_t kOtherCapacity>
pw::BasicInlineAsyncDeque< ValueType, SizeType, kCapacity >::BasicInlineAsyncDeque ( const BasicInlineAsyncDeque< ValueType, SizeType, kOtherCapacity > &  other)
inline

Copy constructs for mismatched capacity.

Note that this will result in a crash if kOtherCapacity < size().

Member Function Documentation

◆ operator=()

template<typename ValueType , typename SizeType , size_t kCapacity = containers::internal::kGenericSized>
template<size_t kOtherCapacity>
BasicInlineAsyncDeque & pw::BasicInlineAsyncDeque< ValueType, SizeType, kCapacity >::operator= ( const BasicInlineAsyncDeque< ValueType, SizeType, kOtherCapacity > &  other)
inline

Copy assigns for mismatched capacity.

Note that this will result in a crash if kOtherCapacity < size().


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