Project Alice
Loading...
Searching...
No Matches
rigtorp::SPSCQueue< T, Allocator > Class Template Reference

#include <SPSCQueue.h>

Public Member Functions

 SPSCQueue (const size_t capacity, const Allocator &allocator=Allocator())
 
 ~SPSCQueue ()
 
 SPSCQueue (const SPSCQueue &)=delete
 
SPSCQueueoperator= (const SPSCQueue &)=delete
 
template<typename... Args>
void emplace (Args &&...args) noexcept(std::is_nothrow_constructible< T, Args &&... >::value)
 
template<typename... Args>
RIGTORP_NODISCARD bool try_emplace (Args &&...args) noexcept(std::is_nothrow_constructible< T, Args &&... >::value)
 
void push (const T &v) noexcept(std::is_nothrow_copy_constructible< T >::value)
 
template<typename P , typename = typename std::enable_if< std::is_constructible<T, P &&>::value>::type>
void push (P &&v) noexcept(std::is_nothrow_constructible< T, P && >::value)
 
RIGTORP_NODISCARD bool try_push (const T &v) noexcept(std::is_nothrow_copy_constructible< T >::value)
 
template<typename P , typename = typename std::enable_if< std::is_constructible<T, P &&>::value>::type>
RIGTORP_NODISCARD bool try_push (P &&v) noexcept(std::is_nothrow_constructible< T, P && >::value)
 
RIGTORP_NODISCARD T * front () noexcept
 
void pop () noexcept
 
RIGTORP_NODISCARD size_t size () const noexcept
 
RIGTORP_NODISCARD bool empty () const noexcept
 
RIGTORP_NODISCARD size_t capacity () const noexcept
 

Detailed Description

template<typename T, typename Allocator = std::allocator<T>>
class rigtorp::SPSCQueue< T, Allocator >

Definition at line 44 of file SPSCQueue.h.

Constructor & Destructor Documentation

◆ SPSCQueue() [1/2]

template<typename T , typename Allocator = std::allocator<T>>
rigtorp::SPSCQueue< T, Allocator >::SPSCQueue ( const size_t  capacity,
const Allocator &  allocator = Allocator() 
)
inlineexplicit

Definition at line 58 of file SPSCQueue.h.

◆ ~SPSCQueue()

template<typename T , typename Allocator = std::allocator<T>>
rigtorp::SPSCQueue< T, Allocator >::~SPSCQueue ( )
inline

Definition at line 92 of file SPSCQueue.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPSCQueue() [2/2]

template<typename T , typename Allocator = std::allocator<T>>
rigtorp::SPSCQueue< T, Allocator >::SPSCQueue ( const SPSCQueue< T, Allocator > &  )
delete

Member Function Documentation

◆ capacity()

template<typename T , typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD size_t rigtorp::SPSCQueue< T, Allocator >::capacity ( ) const
inlinenoexcept

Definition at line 207 of file SPSCQueue.h.

◆ emplace()

template<typename T , typename Allocator = std::allocator<T>>
template<typename... Args>
void rigtorp::SPSCQueue< T, Allocator >::emplace ( Args &&...  args)
inlinenoexcept

Definition at line 105 of file SPSCQueue.h.

Here is the caller graph for this function:

◆ empty()

template<typename T , typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::empty ( ) const
inlinenoexcept

Definition at line 202 of file SPSCQueue.h.

◆ front()

template<typename T , typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD T * rigtorp::SPSCQueue< T, Allocator >::front ( )
inlinenoexcept

Definition at line 168 of file SPSCQueue.h.

Here is the caller graph for this function:

◆ operator=()

template<typename T , typename Allocator = std::allocator<T>>
SPSCQueue & rigtorp::SPSCQueue< T, Allocator >::operator= ( const SPSCQueue< T, Allocator > &  )
delete

◆ pop()

template<typename T , typename Allocator = std::allocator<T>>
void rigtorp::SPSCQueue< T, Allocator >::pop ( )
inlinenoexcept

Definition at line 179 of file SPSCQueue.h.

Here is the caller graph for this function:

◆ push() [1/2]

template<typename T , typename Allocator = std::allocator<T>>
void rigtorp::SPSCQueue< T, Allocator >::push ( const T &  v)
inlinenoexcept

Definition at line 142 of file SPSCQueue.h.

Here is the call graph for this function:

◆ push() [2/2]

template<typename T , typename Allocator = std::allocator<T>>
template<typename P , typename = typename std::enable_if< std::is_constructible<T, P &&>::value>::type>
void rigtorp::SPSCQueue< T, Allocator >::push ( P &&  v)
inlinenoexcept

Definition at line 150 of file SPSCQueue.h.

Here is the call graph for this function:

◆ size()

template<typename T , typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD size_t rigtorp::SPSCQueue< T, Allocator >::size ( ) const
inlinenoexcept

Definition at line 193 of file SPSCQueue.h.

◆ try_emplace()

template<typename T , typename Allocator = std::allocator<T>>
template<typename... Args>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::try_emplace ( Args &&...  args)
inlinenoexcept

Definition at line 122 of file SPSCQueue.h.

Here is the caller graph for this function:

◆ try_push() [1/2]

template<typename T , typename Allocator = std::allocator<T>>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::try_push ( const T &  v)
inlinenoexcept

Definition at line 155 of file SPSCQueue.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_push() [2/2]

template<typename T , typename Allocator = std::allocator<T>>
template<typename P , typename = typename std::enable_if< std::is_constructible<T, P &&>::value>::type>
RIGTORP_NODISCARD bool rigtorp::SPSCQueue< T, Allocator >::try_push ( P &&  v)
inlinenoexcept

Definition at line 164 of file SPSCQueue.h.

Here is the call graph for this function:

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